Skip to main content

Module auth

Module auth 

Source

Modules§

anthropic_token
gemini_oauth
Google/Gemini OAuth2 authentication flow.
oauth_common
Common OAuth2 utilities shared across model_providers.
openai_oauth
profiles

Structs§

AnthropicFlow
AuthFlowContext
Shared context for auth-flow trait methods. Carries the runtime dependencies each flow needs (config for OAuth client creds, auth service for token storage, http client for OAuth round-trips).
AuthService
GeminiFlow
OpenaiCodexFlow
PendingOAuthLogin
Generic pending OAuth login state, shared across model providers.

Enums§

AuthProvider
Auth-flow provider — the finite set the auth login / auth paste-redirect / auth status commands dispatch on. Synonym collapse and canonical-name rendering are both serde-driven via the rename_all + alias attributes, so no string-literal pattern match is needed at the parsing boundary or any dispatch site.
RefreshStatus
Result of AuthProviderFlow::refresh_status — caller renders the outcome (CLI message, gateway JSON, etc.) without doing its own provider-aware formatting.

Traits§

AuthProviderFlow

Functions§

clear_pending_oauth_login
default_profile_id
load_pending_oauth_login
normalize_model_provider
Permissive string-returning normalizer for token-storage callers (paste-token, setup-token, set-active-profile, …) that accept arbitrary provider names. Known OAuth-flow providers collapse to their canonical form via AuthProvider; unknown names lower-case and pass through unchanged so storage works for any bearer-token provider operators want to support. Empty input is rejected.
save_pending_oauth_login
select_profile_id
state_dir_from_config