Skip to main content

Crate vtcode_auth

Crate vtcode_auth 

Source
Expand description

Shared authentication and OAuth flows for VT Code.

Re-exports§

pub use codex_auth_import::CodexAuthJsonRefresher;
pub use codex_auth_import::codex_auth_json_exists;
pub use codex_auth_import::codex_auth_json_path;
pub use codex_auth_import::codex_auth_json_refresher;
pub use codex_auth_import::codex_home_dir;
pub use codex_auth_import::try_load_codex_chatgpt_session;
pub use credentials::AuthCredentialsStoreMode;
pub use credentials::CredentialIdentity;
pub use credentials::CredentialStorage;
pub use credentials::CustomApiKeyStorage;
pub use credentials::clear_custom_api_keys;
pub use credentials::load_custom_api_keys;
pub use credentials::migrate_custom_api_keys;
pub use mcp_oauth::McpOAuthConfig;
pub use mcp_oauth::McpOAuthLoginCompletion;
pub use mcp_oauth::McpOAuthPreparedLogin;
pub use mcp_oauth::McpOAuthService;
pub use mcp_oauth::McpOAuthStatus;
pub use mcp_oauth::McpOAuthToken;
pub use oauth_server::AuthCallbackOutcome;
pub use oauth_server::AuthCodeCallbackServer;
pub use oauth_server::OAuthCallbackPage;
pub use oauth_server::OAuthProvider;
pub use oauth_server::run_auth_code_callback_server;
pub use oauth_server::start_auth_code_callback_server;
pub use openai_chatgpt_oauth::OpenAIChatGptAuthHandle;
pub use openai_chatgpt_oauth::OpenAIChatGptAuthStatus;
pub use openai_chatgpt_oauth::OpenAIChatGptSession;
pub use openai_chatgpt_oauth::OpenAIChatGptSessionProvenance;
pub use openai_chatgpt_oauth::OpenAIChatGptSessionRefresher;
pub use openai_chatgpt_oauth::OpenAICredentialOverview;
pub use openai_chatgpt_oauth::OpenAIResolvedAuth;
pub use openai_chatgpt_oauth::OpenAIResolvedAuthSource;
pub use openai_chatgpt_oauth::clear_openai_chatgpt_session;
pub use openai_chatgpt_oauth::clear_openai_chatgpt_session_with_mode;
pub use openai_chatgpt_oauth::exchange_openai_chatgpt_code_for_tokens;
pub use openai_chatgpt_oauth::generate_openai_oauth_state;
pub use openai_chatgpt_oauth::get_openai_chatgpt_auth_status;
pub use openai_chatgpt_oauth::get_openai_chatgpt_auth_status_with_mode;
pub use openai_chatgpt_oauth::get_openai_chatgpt_auth_url;
pub use openai_chatgpt_oauth::load_openai_chatgpt_session;
pub use openai_chatgpt_oauth::load_openai_chatgpt_session_with_mode;
pub use openai_chatgpt_oauth::parse_openai_chatgpt_manual_callback_input;
pub use openai_chatgpt_oauth::refresh_openai_chatgpt_session_with_mode;
pub use openai_chatgpt_oauth::resolve_openai_auth;
pub use openai_chatgpt_oauth::save_openai_chatgpt_session;
pub use openai_chatgpt_oauth::save_openai_chatgpt_session_with_mode;
pub use openai_chatgpt_oauth::summarize_openai_credentials;
pub use openrouter_oauth::AuthStatus;
pub use openrouter_oauth::OpenRouterOAuthConfig;
pub use openrouter_oauth::OpenRouterToken;
pub use openrouter_oauth::clear_oauth_token;
pub use openrouter_oauth::clear_oauth_token_with_mode;
pub use openrouter_oauth::exchange_code_for_token;
pub use openrouter_oauth::get_auth_status;
pub use openrouter_oauth::get_auth_status_with_mode;
pub use openrouter_oauth::get_auth_url;
pub use openrouter_oauth::load_oauth_token;
pub use openrouter_oauth::load_oauth_token_with_mode;
pub use openrouter_oauth::save_oauth_token;
pub use openrouter_oauth::save_oauth_token_with_mode;
pub use pkce::PkceChallenge;
pub use pkce::generate_pkce_challenge;

Modules§

codex_auth_import
Import ChatGPT OAuth credentials from the Codex CLI’s ~/.codex/auth.json.
credentials
Credential storage — keyring and encrypted-file backends.
mcp_oauth
OAuth support for HTTP MCP providers.
oauth_server
openai_chatgpt_oauth
OpenAI ChatGPT subscription OAuth flow and secure session storage.
openrouter_oauth
OpenRouter OAuth PKCE authentication flow.
pkce
PKCE (Proof Key for Code Exchange) utilities for OAuth 2.0.

Structs§

AuthConfig
CopilotAuthConfig
OpenAIAccountAuthService
Service contract for resolving VT Code’s OpenAI account auth state.
OpenAIAuthConfig

Enums§

OpenAIPreferredMethod