Skip to main content

HACS Authentication

Authentication and authorization components for HACS (Healthcare Agent Communication Standard) providing JWT token management, role-based access control, and comprehensive audit logging.

Features

  • JWT Token Management: Healthcare-specific claims with organization context
  • Role-Based Access Control: 13+ healthcare roles with smart permissions
  • Session Management: Secure session handling with activity tracking
  • Audit Logging: HIPAA-compliant access tracking and compliance reports
  • Healthcare Security: Security levels, PHI tracking, consent management
  • AI Agent Integration: Simplified APIs for intelligent healthcare agents

Installation

pip install hacs-auth

Quick Start

from hacs_auth import AuthManager, Actor, ActorRole, require_auth

# JWT Authentication
auth_manager = AuthManager()
token = auth_manager.create_access_token(
    user_id="physician-123",
    role="physician", 
    permissions=["read:patient", "write:observation"],
    organization="Mayo Clinic"
)

# Actor Management
actor = Actor(
    name="Dr. Sarah Johnson",
    role=ActorRole.PHYSICIAN,
    organization="Mayo Clinic"
)

# Function Protection
@require_auth(permission="read:patient")
def get_patient_data(patient_id: str, **kwargs):
    token_data = kwargs["token_data"]
    return f"Patient data for {patient_id}"

License

MIT License - see LICENSE file for details.

Metadata

Release files for hacs-auth 0.4.3

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

Source distribution (sdist)

Source distribution for hacs-auth 0.4.3
File Size Uploaded Provenance
hacs_auth-0.4.3.tar.gz 42.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hacs-auth 0.4.3
File Interpreter ABI Platform
hacs_auth-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 90.5 kB

Release files / hacs_auth-0.4.3.tar.gz

Download URL hacs_auth-0.4.3.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9395b84a8a3ce34257f1a08cc014e6d60a43cb143be2a614a5381eea32166f0f
BLAKE2b-256 checksum
How to use checksums
210bfea0d374887e74a93e8e70a2e606f7e401d04a344e66efa4c4491e88a6a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.6

Release files / hacs_auth-0.4.3-py3-none-any.whl

Download URL hacs_auth-0.4.3-py3-none-any.whl
Size 47.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60cfa71f34927d7acdb6322439f829d7f468003e3cd165ef2d6e71ddfe075992
BLAKE2b-256 checksum
How to use checksums
58bebd42b48fc72771acb106bc826d88b0222f150fb2a34215ab2d2e86c43e1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.6

Security for hacs-auth 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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