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 details)

Uploaded Source

Built Distribution

File details

Details for the file minumtium_simple_jwt_auth-1.1.0.tar.gz.

File metadata

File hashes

Hashes for minumtium_simple_jwt_auth-1.1.0.tar.gz
Algorithm Hash digest
SHA256 074ade988a28d7a93897209ff847d569da404c45983864f0809e9c07e9820c53
MD5 2c67e40766ab4c9415cea4f06acc159e
BLAKE2b-256 c10116e86faf35ab577e76e612b7d7ed324202ccd2de05d8c7cf899df93d17c6

See more details on using hashes here.

File details

Details for the file minumtium_simple_jwt_auth-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for minumtium_simple_jwt_auth-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 572e24bb2840d3dcaee8bae7f8a001ce751a3f516733dddb250b7affede1a5da
MD5 58aad956eab1978d33cabfaf33100382
BLAKE2b-256 e2f64ee795c6e9ab6ea07d5dfe5debac9025cfcc6b20f80b509083857f3e8e22

See more details on using hashes here.

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