Skip to main content

core-auth

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


PyPI Downloads 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

Metadata

Release files for core-auth 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for core-auth 1.2.1
File Size Uploaded
core_auth-1.2.1.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for core-auth 1.2.1
File Interpreter ABI Platform
core_auth-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / core_auth-1.2.1.tar.gz

Download URL core_auth-1.2.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fd0f4cce3bc03b8bffd137bd4955f84e1eeb13110496e26d9e80030624cb2516
BLAKE2b-256 checksum
How to use checksums
f5de78ce1ccb60ee6b8a02e1bb2d5becfceda13058659fd8a1baac08b04cfb28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / core_auth-1.2.1-py3-none-any.whl

Download URL core_auth-1.2.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04b0f7d60414b4d9276afb6d9ec684d7c441498126ec6b6c92e835369d070ded
BLAKE2b-256 checksum
How to use checksums
65c91fc657b717fa3811a776fc4ac021e0b6345fcc43461814b03d37bcca2070
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page