Documentation
¶
Overview ¶
Package llmauth defines provider-neutral credential storage contracts. The host application owns storage policy and login UX; provider packages can use these contracts without taking a dependency on a particular keyring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCredentialNotFound = errors.New("llm auth: credential not found")
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Credential struct {
Provider string `json:"provider"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token,omitempty"`
IDToken string `json:"id_token,omitempty"`
AccountID string `json:"account_id,omitempty"`
UserID string `json:"user_id,omitempty"`
Email string `json:"email,omitempty"`
Plan string `json:"plan,omitempty"`
FedRAMP bool `json:"fedramp,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
Credential contains renewable OAuth material plus non-secret account metadata. AccessToken, RefreshToken, and IDToken must always be treated as secrets by Store implementations and callers.
type Store ¶
type Store interface {
Load(context.Context, string) (Credential, error)
Save(context.Context, string, Credential) error
Delete(context.Context, string) error
}
Store persists named credential profiles. Implementations should provide process-safe replacement semantics and return ErrCredentialNotFound from Load and Delete when the named profile does not exist.
Click to show internal directories.
Click to hide internal directories.