Skip to main content

Module auth_storage

Module auth_storage 

Source
Expand description

Authentication storage for API keys, OAuth tokens, and session tokens.

Provides secure storage and retrieval of authentication credentials, with OS keyring integration and fallback to encrypted file storage. Supports multi-provider auth, credential validation, and session tokens.

Modules§

keyring_support
Wrapper for using OS keyring with fallback

Structs§

AuthStatus
Authentication status
AuthStorage
Main auth storage struct.
FileAuthStorage
File-based auth storage backend
FnFallbackResolver
A simple closure-based fallback resolver
MemoryAuthStorage
Memory-based auth storage (for testing)

Enums§

AuthCredential
Authentication credential
AuthError
Authentication errors
CredentialValidationError
Credential validation error

Traits§

AuthStorageBackend
Storage backend trait
FallbackResolver
Trait for fallback API key resolution (e.g., from models.json config)

Functions§

shared_auth_storage
Get a shared singleton Arc<AuthStorage> instance.

Type Aliases§

AuthResult
Result of an auth operation