Skip to main content

A JWT token adapter for the minumtium library.

Project description

Minumtium Simple JWT Auth

A very simple JWT Auth adapter for the minumtium library.

What can I use it for?

It is used to provide JWT token authentication using the minumtium library.

Usage

Install it using your favorite package manager:

pip install minumtium-simple-jwt-auth
pipenv install minumtium-simple-jwt-auth
poetry install minumtium-simple-jwt-auth

Then, provide it to your minumtium Idm service:

from minumtium.modules.idm import IdmService, UserRepository
from minumtium_sql_alchemy_adapter import SqlAlchemyAdapter
from minumtium_simple_jwt_auth import MinumtiumSimpleJwtAuthentication

db_adapter = SqlAlchemyAdapter({'engine': 'sqlite_memory'}, 'posts')
auth_adapter = MinumtiumSimpleJwtAuthentication(configuration={
    'jwt_key': 'not a reliable key, change that quickly',
    'session_duration_hours': 1})

users_repository = UserRepository(db_adapter)
idm_service = IdmService(auth_adapter, users_repository)

idm_service.authenticate('jao', 'batata')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minumtium_simple_jwt_auth-1.1.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

minumtium_simple_jwt_auth-1.1.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page