This library contains common elements related to authentication & authorization...
Project description
core-auth
This project/library contains common elements related to authentication & authorization…
Installation
Install from PyPI using pip:
pip install core-auth
uv pip install core-auth # Or using UV...
Features
JWT Token Wrapper - Simplified interface for JSON Web Token operations
Multiple Cryptographic Algorithms - Support for HMAC (HS256, HS384, HS512), RSA (RS256, RS384, RS512, PS256, PS384, PS512), ECDSA (ES256, ES256K, ES384, ES512), and EdDSA algorithms
Token Encoding - Create JWT tokens with customizable claims, headers, and expiration times
Token Decoding & Validation - Decode and verify JWT tokens with comprehensive validation options (signature, expiration, audience, issuer, etc.)
Authorization Header Parsing - Extract Bearer tokens from HTTP Authorization headers
Public/Private Key Support - Compatible with RSA, Elliptic Curve (EC), Ed25519, and Ed448 key pairs
Custom Claims - Add standardized or custom claims to JWT payloads
Type-Safe - Full type hints support for better IDE integration and code safety
Quick Start
Installation
Install the package:
pip install core-auth
uv pip install core-auth # Or using UV...
pip install -e ".[dev]" # For development...
Setting Up Environment
Install required libraries:
pip install --upgrade pip
pip install virtualenv
Create Python virtual environment:
virtualenv --python=python3.12 .venv
Activate the virtual environment:
source .venv/bin/activate
Install packages
pip install .
pip install -e ".[dev]"
Check tests and coverage
python manager.py run-tests
python manager.py run-coverage
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Write tests for new functionality
Ensure all tests pass: pytest -n auto
Run linting: pylint core_auth
Run security checks: bandit -r core_auth
Submit a pull request
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
Support
For questions or support, please open an issue on GitLab or contact the maintainers.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file core_auth-1.1.1.tar.gz.
File metadata
- Download URL: core_auth-1.1.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
566d09eaed65121fd94886b7ec31aad2b88d235b402eed2390b3a8eb0d804a69
|
|
| MD5 |
96036d234b635bf8670b3e337dc4b987
|
|
| BLAKE2b-256 |
185676a29ddc42ce203abb0cbdeddd3b411e62a06448f970655b9653102d5a3f
|
File details
Details for the file core_auth-1.1.1-py3-none-any.whl.
File metadata
- Download URL: core_auth-1.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3a7ad03db39dc3e9c31f8eada54d450c59961ff0fe950bb3ae3f21b1f5c09e4
|
|
| MD5 |
5bd86cea26e6744d4b4b9a8fe9260bb0
|
|
| BLAKE2b-256 |
2ac3ff00d8108909ad984a012a614a0e35c1ce38fc4f5faf9c17f6b3c35e04b4
|