ccproxy.auth.credentials_adapter¶
ccproxy.auth.credentials_adapter
¶
Adapter to make CredentialsManager compatible with AuthManager interface.
CredentialsAuthManager
¶
Bases: BaseAuthManager
Adapter to make CredentialsManager compatible with AuthManager interface.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
credentials_manager
|
CredentialsManager | None
|
CredentialsManager instance, creates new if None |
None
|
Source code in ccproxy/auth/credentials_adapter.py
get_access_token
async
¶
Get valid access token from credentials manager.
Returns:
Type | Description |
---|---|
str
|
Access token string |
Raises:
Type | Description |
---|---|
AuthenticationError
|
If authentication fails |
Source code in ccproxy/auth/credentials_adapter.py
get_credentials
async
¶
Get valid credentials from credentials manager.
Returns:
Type | Description |
---|---|
ClaudeCredentials
|
Valid credentials |
Raises:
Type | Description |
---|---|
AuthenticationError
|
If authentication fails |
Source code in ccproxy/auth/credentials_adapter.py
is_authenticated
async
¶
Check if current authentication is valid.
Returns:
Type | Description |
---|---|
bool
|
True if authenticated, False otherwise |
Source code in ccproxy/auth/credentials_adapter.py
get_user_profile
async
¶
Get user profile information.
Returns:
Type | Description |
---|---|
UserProfile | None
|
UserProfile if available, None otherwise |