ccproxy.auth.bearer¶
ccproxy.auth.bearer
¶
Bearer token authentication implementation.
BearerTokenAuthManager
¶
Bases: BaseAuthManager
Authentication manager for static bearer tokens.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
token
|
str
|
Bearer token string |
required |
Source code in ccproxy/auth/bearer.py
get_access_token
async
¶
Get the bearer token.
Returns:
Type | Description |
---|---|
str
|
Bearer token string |
Raises:
Type | Description |
---|---|
AuthenticationError
|
If token is invalid |
Source code in ccproxy/auth/bearer.py
get_credentials
async
¶
Get credentials (not supported for bearer tokens).
Raises:
Type | Description |
---|---|
AuthenticationError
|
Bearer tokens don't support full credentials |
Source code in ccproxy/auth/bearer.py
is_authenticated
async
¶
Check if bearer token is available.
Returns:
Type | Description |
---|---|
bool
|
True if token is available, False otherwise |
get_user_profile
async
¶
Get user profile (not supported for bearer tokens).
Returns:
Type | Description |
---|---|
UserProfile | None
|
None - bearer tokens don't support user profiles |