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.0.2.tar.gz (8.2 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.0.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file core_auth-1.0.2.tar.gz.

File metadata

  • Download URL: core_auth-1.0.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for core_auth-1.0.2.tar.gz
Algorithm Hash digest
SHA256 bbd31580e5c9cb32845225b899d4d2ff0ef3ab803f06ad45c2dd5021831c6966
MD5 564ce5741ad73dcda1e3715660b834ad
BLAKE2b-256 53ada0d277c608c975147bb178b3a1395ef6cd52e492be4bddf75ad9d4d76cc2

See more details on using hashes here.

File details

Details for the file core_auth-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: core_auth-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for core_auth-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61a40edda5d256d86667e1f5f61472e5d0eb4cdcf4de4f16eec64aad94be4624
MD5 067e74bba9bc371cd6bb52021ddb3be6
BLAKE2b-256 6bdd7465ad55cfa61adc1b7eea8ae0a4d4f9322891dcb771a959b7b5414be084

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