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.0.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.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: core_auth-1.1.0.tar.gz
  • Upload date:
  • Size: 8.2 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.0.tar.gz
Algorithm Hash digest
SHA256 85e0040d5abfb438e08e31bdf9f7503a60aaac2c36c4180b2f3caf9e15796907
MD5 0e115d55279a838e88bf1fd4b764d400
BLAKE2b-256 348922314d29e5b0bebf1f779ea78b48cd977f199504ad2120bd04ae6e02f20c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: core_auth-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b7e243902dd29c98f9aee30dd536faf627c6ad72d00eb3ec4af6d85ec0a73a5
MD5 1d2c624dc376ba729158b94a1fd81184
BLAKE2b-256 0d6667dc887126b51020964ffe12f6480c35ff71a1848ad8ffb258d2e0369421

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