Skip to main content

Module auth_manager

Module auth_manager 

Source
Expand description

Authentication manager for storing and retrieving provider credentials

This module manages provider credentials stored in auth.toml in the config directory. Credentials are organized by profile and provider, with support for a shared “all” profile that serves as a fallback for all other profiles.

§File Structure

# Shared across all profiles
[all.anthropic]
type = "oauth"
access = "eyJ..."
refresh = "eyJ..."
expires = 1735600000000

# Profile-specific override
[work.anthropic]
type = "api"
key = "sk-ant-..."

Structs§

AuthFile
Structure of the auth.toml file
AuthManager
Manages provider credentials stored in auth.toml

Functions§

get_auth_file_path
Get the auth file path for a given config directory
get_default_config_dir
Get the default Stakpak config directory