mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
[codex] Add externally provided Codex auth (#31274)
## Summary Add an in-memory externally provided Codex auth snapshot with explicit runtime capabilities, installed through the existing `ExternalAuth` provider path. ## Testing - `just fmt-check` - `cargo test -p codex-login --lib externally_provided_auth` - `cargo test -p codex-core --lib external_auth_snapshot_is_installed_from_runtime_config` - `cargo test -p codex-model-provider --lib external_auth` - `cargo test -p codex-mcp-extension --test hosted_apps_mcp hosted_apps_mcp_accepts_external_provided_codex_auth` - `cargo check -p codex-app-server -p codex-core-api -p codex-thread-manager-sample` --------- Co-authored-by: pakrym-oai <pakrym@openai.com>
This commit is contained in:
1 parent
dbd2df27d1
commit
8784de445e
29 files changed
+278
-7
No files matched your search
@@ -1327,6 +1327,7 @@ fn stored_auth_mode(auth: &codex_login::AuthDotJson) -> &'static str {
|
||||
AuthMode::ApiKey => "api_key",
|
||||
AuthMode::Chatgpt => "chatgpt",
|
||||
AuthMode::ChatgptAuthTokens => "chatgpt_auth_tokens",
|
||||
AuthMode::Headers => "headers",
|
||||
AuthMode::AgentIdentity => "agent_identity",
|
||||
AuthMode::PersonalAccessToken => "personal_access_token",
|
||||
AuthMode::BedrockApiKey => "bedrock_api_key",
|
||||
@@ -1397,6 +1398,9 @@ fn stored_auth_issues(
|
||||
issues.push("external ChatGPT auth is missing refresh metadata");
|
||||
}
|
||||
}
|
||||
AuthMode::Headers => {
|
||||
issues.push("header auth cannot be loaded from auth storage");
|
||||
}
|
||||
AuthMode::AgentIdentity => {
|
||||
if auth
|
||||
.agent_identity
|
||||
@@ -2466,6 +2470,7 @@ fn auth_mode_name(auth: &CodexAuth) -> &'static str {
|
||||
AuthMode::ApiKey => "api_key",
|
||||
AuthMode::Chatgpt => "chatgpt",
|
||||
AuthMode::ChatgptAuthTokens => "chatgpt_auth_tokens",
|
||||
AuthMode::Headers => "headers",
|
||||
AuthMode::AgentIdentity => "agent_identity",
|
||||
AuthMode::PersonalAccessToken => "personal_access_token",
|
||||
AuthMode::BedrockApiKey => "bedrock_api_key",
|
||||
@@ -2605,6 +2610,7 @@ fn provider_auth_reachability_mode_from_auth(
|
||||
Some(
|
||||
AuthMode::Chatgpt
|
||||
| AuthMode::ChatgptAuthTokens
|
||||
| AuthMode::Headers
|
||||
| AuthMode::AgentIdentity
|
||||
| AuthMode::PersonalAccessToken,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user