Files
zeekay 23138100de refactor: rebrand Infisical Python SDK -> Hanzo KMS Python SDK
- Rename package: infisical_sdk -> hanzo_kms (pip: hanzokms)
- Rename classes: InfisicalSDKClient -> KMSClient, InfisicalRequests -> KMSRequests, InfisicalError -> KMSError
- Default API host: https://kms.hanzo.ai
- Update all imports, docstrings, and user-facing strings
- Copyright: Hanzo AI Inc.
- Backward-compatible aliases: InfisicalSDKClient, InfisicalError
- Env var: INFISICAL_AWS_IAM_AUTH_IDENTITY_ID -> HANZO_KMS_AWS_IAM_AUTH_IDENTITY_ID
- Remove obsolete OpenAPI generator files (.travis.yml, .gitlab-ci.yml, etc.)
2026-02-24 02:00:18 -08:00

22 lines
662 B
Python

from typing import Callable
class TokenAuth:
def __init__(self, setToken: Callable[[str], None]):
self.setToken = setToken
def login(self, token: str) -> str:
"""
Authenticate using a token. This can be either a machine identity token or a user JWT token.
Machine Identity Token: Generated from Token Auth method in Hanzo KMS.
User JWT Token: A valid JWT token for user authentication.
Args:
token (str): Your authentication token (machine identity token or user JWT).
Returns:
str: The token that was set.
"""
self.setToken(token)
return token