hacs-auth


Namehacs-auth JSON
Version 0.4.3 PyPI version JSON
download
home_pageNone
SummaryAuthentication and authorization components for HACS (Healthcare Agent Communication Standard)
upload_time2025-08-12 14:27:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords ai-agents authentication authorization fhir healthcare jwt oauth2
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
pip install hacs-auth
```

## Quick Start

```python
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.
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hacs-auth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Solano Todeschini <solanovisitor@gmail.com>",
    "keywords": "ai-agents, authentication, authorization, fhir, healthcare, jwt, oauth2",
    "author": null,
    "author_email": "Solano Todeschini <solanovisitor@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/21/0b/fea0d374887e74a93e8e70a2e606f7e401d04a344e66efa4c4491e88a6a1/hacs_auth-0.4.3.tar.gz",
    "platform": null,
    "description": "# HACS Authentication\n\nAuthentication and authorization components for HACS (Healthcare Agent Communication Standard) providing JWT token management, role-based access control, and comprehensive audit logging.\n\n## Features\n\n- **JWT Token Management**: Healthcare-specific claims with organization context\n- **Role-Based Access Control**: 13+ healthcare roles with smart permissions\n- **Session Management**: Secure session handling with activity tracking  \n- **Audit Logging**: HIPAA-compliant access tracking and compliance reports\n- **Healthcare Security**: Security levels, PHI tracking, consent management\n- **AI Agent Integration**: Simplified APIs for intelligent healthcare agents\n\n## Installation\n\n```bash\npip install hacs-auth\n```\n\n## Quick Start\n\n```python\nfrom hacs_auth import AuthManager, Actor, ActorRole, require_auth\n\n# JWT Authentication\nauth_manager = AuthManager()\ntoken = auth_manager.create_access_token(\n    user_id=\"physician-123\",\n    role=\"physician\", \n    permissions=[\"read:patient\", \"write:observation\"],\n    organization=\"Mayo Clinic\"\n)\n\n# Actor Management\nactor = Actor(\n    name=\"Dr. Sarah Johnson\",\n    role=ActorRole.PHYSICIAN,\n    organization=\"Mayo Clinic\"\n)\n\n# Function Protection\n@require_auth(permission=\"read:patient\")\ndef get_patient_data(patient_id: str, **kwargs):\n    token_data = kwargs[\"token_data\"]\n    return f\"Patient data for {patient_id}\"\n```\n\n## License\n\nMIT License - see LICENSE file for details.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Authentication and authorization components for HACS (Healthcare Agent Communication Standard)",
    "version": "0.4.3",
    "project_urls": {
        "Changelog": "https://github.com/solanovisitor/hacs-ai/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/solanovisitor/hacs-ai/blob/main/docs/",
        "Homepage": "https://github.com/solanovisitor/hacs-ai",
        "Issues": "https://github.com/solanovisitor/hacs-ai/issues",
        "Repository": "https://github.com/solanovisitor/hacs-ai"
    },
    "split_keywords": [
        "ai-agents",
        " authentication",
        " authorization",
        " fhir",
        " healthcare",
        " jwt",
        " oauth2"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "58bebd42b48fc72771acb106bc826d88b0222f150fb2a34215ab2d2e86c43e1b",
                "md5": "cb09a1d56debc4abebfabc2d84d81b7e",
                "sha256": "60cfa71f34927d7acdb6322439f829d7f468003e3cd165ef2d6e71ddfe075992"
            },
            "downloads": -1,
            "filename": "hacs_auth-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cb09a1d56debc4abebfabc2d84d81b7e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 47629,
            "upload_time": "2025-08-12T14:27:40",
            "upload_time_iso_8601": "2025-08-12T14:27:40.886175Z",
            "url": "https://files.pythonhosted.org/packages/58/be/bd42b48fc72771acb106bc826d88b0222f150fb2a34215ab2d2e86c43e1b/hacs_auth-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "210bfea0d374887e74a93e8e70a2e606f7e401d04a344e66efa4c4491e88a6a1",
                "md5": "8f53df5453c53efc1e33f8ef9e8e9f31",
                "sha256": "9395b84a8a3ce34257f1a08cc014e6d60a43cb143be2a614a5381eea32166f0f"
            },
            "downloads": -1,
            "filename": "hacs_auth-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8f53df5453c53efc1e33f8ef9e8e9f31",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 42897,
            "upload_time": "2025-08-12T14:27:55",
            "upload_time_iso_8601": "2025-08-12T14:27:55.273567Z",
            "url": "https://files.pythonhosted.org/packages/21/0b/fea0d374887e74a93e8e70a2e606f7e401d04a344e66efa4c4491e88a6a1/hacs_auth-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-12 14:27:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "solanovisitor",
    "github_project": "hacs-ai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hacs-auth"
}
        
Elapsed time: 2.16400s