Skip to main content

This library contains common elements related to authentication & authorization...

Project description

core-auth

This project/library contains common elements related to authentication & authorization…


Python Versions License Pipeline Status Docs Status Security

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

  1. Install required libraries:

pip install --upgrade pip
pip install virtualenv
  1. Create Python virtual environment:

virtualenv --python=python3.12 .venv
  1. 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:

  1. Fork the repository

  2. Create a feature branch

  3. Write tests for new functionality

  4. Ensure all tests pass: pytest -n auto

  5. Run linting: pylint core_auth

  6. Run security checks: bandit -r core_auth

  7. Submit a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For questions or support, please open an issue on GitLab or contact the maintainers.

Authors

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

core_auth-1.1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

core_auth-1.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

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

Hashes for core_auth-1.1.1.tar.gz
Algorithm Hash digest
SHA256 566d09eaed65121fd94886b7ec31aad2b88d235b402eed2390b3a8eb0d804a69
MD5 96036d234b635bf8670b3e337dc4b987
BLAKE2b-256 185676a29ddc42ce203abb0cbdeddd3b411e62a06448f970655b9653102d5a3f

See more details on using hashes here.

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

Hashes for core_auth-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3a7ad03db39dc3e9c31f8eada54d450c59961ff0fe950bb3ae3f21b1f5c09e4
MD5 5bd86cea26e6744d4b4b9a8fe9260bb0
BLAKE2b-256 2ac3ff00d8108909ad984a012a614a0e35c1ce38fc4f5faf9c17f6b3c35e04b4

See more details on using hashes here.

Supported by

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