pub struct CodexOAuth {
pub auth_base_url: String,
pub callback_port: u16,
pub redirect_uri: String,
}Expand description
The Codex sign-in and its endpoints.
Fields§
§auth_base_url: Stringhttps://auth.openai.com. Every endpoint is relative to it.
callback_port: u16Loopback callback port, shared with the Codex CLI.
redirect_uri: StringRedirect URI for the browser flow, which must reach the callback port.
Trait Implementations§
Source§impl Clone for CodexOAuth
impl Clone for CodexOAuth
Source§impl Debug for CodexOAuth
impl Debug for CodexOAuth
Source§impl Default for CodexOAuth
impl Default for CodexOAuth
Source§fn default() -> CodexOAuth
fn default() -> CodexOAuth
Returns the “default value” for a type. Read more
Source§impl OAuthProvider for CodexOAuth
impl OAuthProvider for CodexOAuth
Source§fn login<'a>(
&'a self,
interaction: &'a Interaction,
_options: &'a LoginOptions,
) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
fn login<'a>( &'a self, interaction: &'a Interaction, _options: &'a LoginOptions, ) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
Runs the sign-in.
Source§fn refresh<'a>(
&'a self,
credential: &'a OAuthCredential,
cancel: &'a CancellationToken,
) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
fn refresh<'a>( &'a self, credential: &'a OAuthCredential, cancel: &'a CancellationToken, ) -> BoxFuture<'a, Result<OAuthCredential, AuthError>>
Exchanges the refresh token for a new credential.
Source§fn login_label(&self) -> Option<&str>
fn login_label(&self) -> Option<&str>
Label of the login menu entry, when the provider sets one.
Source§fn is_subscription(&self) -> bool
fn is_subscription(&self) -> bool
Whether the account is a subscription, which the login menu labels.
Auto Trait Implementations§
impl Forget for CodexOAuth
impl Freeze for CodexOAuth
impl RefUnwindSafe for CodexOAuth
impl Send for CodexOAuth
impl Sync for CodexOAuth
impl Unpin for CodexOAuth
impl UnsafeUnpin for CodexOAuth
impl UnwindSafe for CodexOAuth
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