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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file minumtium_simple_jwt_auth-1.1.0.tar.gz
.
File metadata
- Download URL: minumtium_simple_jwt_auth-1.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 074ade988a28d7a93897209ff847d569da404c45983864f0809e9c07e9820c53 |
|
MD5 | 2c67e40766ab4c9415cea4f06acc159e |
|
BLAKE2b-256 | c10116e86faf35ab577e76e612b7d7ed324202ccd2de05d8c7cf899df93d17c6 |
File details
Details for the file minumtium_simple_jwt_auth-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: minumtium_simple_jwt_auth-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 572e24bb2840d3dcaee8bae7f8a001ce751a3f516733dddb250b7affede1a5da |
|
MD5 | 58aad956eab1978d33cabfaf33100382 |
|
BLAKE2b-256 | e2f64ee795c6e9ab6ea07d5dfe5debac9025cfcc6b20f80b509083857f3e8e22 |