Skip to main content

vtcode_config/auth/
mod.rs

1//! Authentication utilities for VT Code.
2//!
3//! This module provides:
4//! - Generic credential storage with OS keyring and file backends
5//! - OAuth PKCE support for OpenRouter and other providers
6//!
7//! ## Credential Storage
8//!
9//! Credentials are stored using OS-specific secure storage (keyring) by default,
10//! with fallback to AES-256-GCM encrypted files if the keyring is unavailable.
11
12pub mod credentials;
13pub mod openrouter_oauth;
14pub mod pkce;
15
16pub use credentials::{AuthCredentialsStoreMode, CredentialStorage};
17pub use openrouter_oauth::{
18    AuthStatus, OpenRouterOAuthConfig, OpenRouterToken, clear_oauth_token, exchange_code_for_token,
19    get_auth_status, get_auth_url, load_oauth_token, load_oauth_token_with_mode, save_oauth_token,
20    save_oauth_token_with_mode,
21};
22pub use pkce::{PkceChallenge, generate_pkce_challenge};