Expand description
Authentication manager for storing and retrieving provider credentials
§Deprecated
This module is deprecated. Credentials are now stored directly in config.toml
under [profiles.{profile}.providers.{provider}.auth] instead of in a separate
auth.toml file.
The AuthManager is kept temporarily for:
- Reading existing
auth.tomlfiles during migration - Backward compatibility during the transition period
New code should use ProviderConfig::set_auth() and ProviderConfig::get_auth()
to manage provider credentials directly in config.toml.
§Migration
When config.toml is loaded, any credentials in auth.toml are automatically
migrated to the new format in config.toml, and auth.toml is backed up to
auth.toml.bak.
§Legacy File Structure (auth.toml - deprecated)
# 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§
- Auth
File - Structure of the auth.toml file
- Auth
Manager - 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