Skip to main content

Module auth

Module auth 

Source
Expand description

Authentication utilities for VT Code.

This module provides:

  • Generic credential storage with OS keyring and file backends
  • OAuth PKCE support for OpenRouter and other providers

§Credential Storage

Credentials are stored using OS-specific secure storage (keyring) by default, with fallback to AES-256-GCM encrypted files if the keyring is unavailable.

Re-exports§

pub use credentials::AuthCredentialsStoreMode;
pub use credentials::CredentialStorage;
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::exchange_code_for_token;
pub use openrouter_oauth::get_auth_status;
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§

credentials
Generic credential storage with OS keyring and file-based backends.
openrouter_oauth
OpenRouter OAuth PKCE authentication flow.
pkce
PKCE (Proof Key for Code Exchange) utilities for OAuth 2.0.