Skip to main content

vtcode_core/auth/
mod.rs

1//! Authentication module for VT Code.
2//!
3//! This module provides:
4//! - OAuth flows for OpenRouter and other providers
5//! - ACP authentication method handling
6//! - Authentication configuration management
7
8pub mod auth_handler;
9
10#[cfg(feature = "a2a-server")]
11pub use vtcode_auth::{
12    AuthCallbackOutcome as OAuthResult, OAuthCallbackPage, OAuthProvider,
13    run_auth_code_callback_server as run_oauth_callback_server,
14};
15
16pub use auth_handler::{AuthHandler, AuthMethod};
17
18// Re-export config auth types for convenience
19pub use vtcode_config::auth::{
20    AuthStatus, OpenRouterOAuthConfig, OpenRouterToken, PkceChallenge, clear_oauth_token,
21    exchange_code_for_token, generate_pkce_challenge, get_auth_status, get_auth_url,
22    load_oauth_token, save_oauth_token,
23};