ccproxy.plugins.copilot.oauth.storage¶
ccproxy.plugins.copilot.oauth.storage
¶
Storage implementation for GitHub Copilot OAuth credentials.
CopilotOAuthStorage
¶
Bases: BaseJsonStorage[CopilotCredentials]
Storage implementation for Copilot OAuth credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
credentials_path
|
Path | None
|
Path to credentials file (uses default if None) |
None
|
Source code in ccproxy/plugins/copilot/oauth/storage.py
save
async
¶
Store Copilot credentials to file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
credentials
|
CopilotCredentials
|
Credentials to store |
required |
Source code in ccproxy/plugins/copilot/oauth/storage.py
load
async
¶
Load Copilot credentials from file.
Returns:
| Type | Description |
|---|---|
CopilotCredentials | None
|
Credentials if found and valid, None otherwise |
Source code in ccproxy/plugins/copilot/oauth/storage.py
delete
async
¶
update_oauth_token
async
¶
Update OAuth token in stored credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
oauth_token
|
CopilotOAuthToken
|
New OAuth token to store |
required |
Source code in ccproxy/plugins/copilot/oauth/storage.py
update_copilot_token
async
¶
Update Copilot service token in stored credentials.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
copilot_token
|
CopilotTokenResponse
|
New Copilot token to store |
required |
Source code in ccproxy/plugins/copilot/oauth/storage.py
get_oauth_token
async
¶
Get OAuth token from stored credentials.
Returns:
| Type | Description |
|---|---|
CopilotOAuthToken | None
|
OAuth token if available, None otherwise |
Source code in ccproxy/plugins/copilot/oauth/storage.py
get_copilot_token
async
¶
Get Copilot service token from stored credentials.
Returns:
| Type | Description |
|---|---|
CopilotTokenResponse | None
|
Copilot token if available, None otherwise |