ccproxy.auth.manager¶
ccproxy.auth.manager
¶
Authentication manager interfaces for centralized auth handling.
AuthManager
¶
Bases: Protocol
Protocol for authentication managers.
get_access_token
async
¶
Get valid access token.
Returns:
Type | Description |
---|---|
str
|
Access token string |
Raises:
Type | Description |
---|---|
AuthenticationError
|
If authentication fails |
get_credentials
async
¶
Get valid credentials.
Returns:
Type | Description |
---|---|
ClaudeCredentials
|
Valid credentials |
Raises:
Type | Description |
---|---|
AuthenticationError
|
If authentication fails |
is_authenticated
async
¶
Check if current authentication is valid.
Returns:
Type | Description |
---|---|
bool
|
True if authenticated, False otherwise |
get_user_profile
async
¶
Get user profile information.
Returns:
Type | Description |
---|---|
UserProfile | None
|
UserProfile if available, None otherwise |
BaseAuthManager
¶
Bases: ABC
Base class for authentication managers.
get_access_token
abstractmethod
async
¶
Get valid access token.
Returns:
Type | Description |
---|---|
str
|
Access token string |
Raises:
Type | Description |
---|---|
AuthenticationError
|
If authentication fails |
get_credentials
abstractmethod
async
¶
Get valid credentials.
Returns:
Type | Description |
---|---|
ClaudeCredentials
|
Valid credentials |
Raises:
Type | Description |
---|---|
AuthenticationError
|
If authentication fails |
is_authenticated
abstractmethod
async
¶
Check if current authentication is valid.
Returns:
Type | Description |
---|---|
bool
|
True if authenticated, False otherwise |
get_user_profile
async
¶
Get user profile information.
Returns:
Type | Description |
---|---|
UserProfile | None
|
UserProfile if available, None otherwise |