pub enum AuthMode {
Apikey,
Chatgpt,
ChatgptAuthTokens,
Headers,
AgentIdentity,
PersonalAccessToken,
BedrockApiKey,
}Expand description
Authentication mode for OpenAI-backed providers.
JSON schema
{
"description": "Authentication mode for OpenAI-backed providers.",
"oneOf": [
{
"description": "OpenAI API key provided by the caller and stored by Codex.",
"type": "string",
"enum": [
"apikey"
]
},
{
"description": "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
"type": "string",
"enum": [
"chatgpt"
]
},
{
"description": "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
"type": "string",
"enum": [
"chatgptAuthTokens"
]
},
{
"description": "Backend auth supplied as request headers.",
"type": "string",
"enum": [
"headers"
]
},
{
"description": "Programmatic Codex auth backed by a registered Agent Identity.",
"type": "string",
"enum": [
"agentIdentity"
]
},
{
"description": "Programmatic Codex auth backed by a personal access token.",
"type": "string",
"enum": [
"personalAccessToken"
]
},
{
"description": "Amazon Bedrock bearer token managed by Codex.",
"type": "string",
"enum": [
"bedrockApiKey"
]
}
]
}Variants§
Apikey
OpenAI API key provided by the caller and stored by Codex.
Chatgpt
ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).
ChatgptAuthTokens
[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.
ChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.
Headers
Backend auth supplied as request headers.
AgentIdentity
Programmatic Codex auth backed by a registered Agent Identity.
PersonalAccessToken
Programmatic Codex auth backed by a personal access token.
BedrockApiKey
Amazon Bedrock bearer token managed by Codex.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthMode
impl<'de> Deserialize<'de> for AuthMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for AuthMode
impl Ord for AuthMode
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for AuthMode
impl PartialOrd for AuthMode
Source§impl TryFrom<&String> for AuthMode
impl TryFrom<&String> for AuthMode
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for AuthMode
impl TryFrom<&str> for AuthMode
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for AuthMode
impl TryFrom<String> for AuthMode
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
impl Copy for AuthMode
impl Eq for AuthMode
impl StructuralPartialEq for AuthMode
Auto Trait Implementations§
impl Freeze for AuthMode
impl RefUnwindSafe for AuthMode
impl Send for AuthMode
impl Sync for AuthMode
impl Unpin for AuthMode
impl UnsafeUnpin for AuthMode
impl UnwindSafe for AuthMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.