llmauth

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 2

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.

Directories

Path Synopsis
Package openaiauth implements renewable ChatGPT subscription OAuth credentials.
Package openaiauth implements renewable ChatGPT subscription OAuth credentials.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL