Versions in this module Expand all Collapse all v1 v1.1.0 Oct 12, 2026 Changes in this version + const ProvisionAllowlist + const ProvisionAuto + func FreshAccessToken(ctx context.Context, remote remoteapi.RemoteConfig) (string, error) + func LoginOIDC(ctx context.Context, req OIDCLoginRequest) (remoteapi.RemoteConfig, error) + func OpenBrowser(url string) error + type Discovery struct + AuthorizationEndpoint string + Issuer string + JWKSURI string + TokenEndpoint string + func Discover(ctx context.Context, client *http.Client, issuer string) (Discovery, error) + type DispatchVerifier struct + Invite *StoreVerifier + OIDC *OIDCVerifier + func (d DispatchVerifier) Verify(token string) (Identity, error) + type OIDCConfig struct + AllowClaim string + AllowValue string + Audience string + Issuer string + JWKSURL string + OrgValue string + PrincipalClaim string + Provision string + RoleClaim string + func (c *OIDCConfig) Prepare() error + type OIDCLoginRequest struct + CAFile string + ClientID string + DataDir string + HTTP *http.Client + Issuer string + MakeDefault bool + Name string + OpenBrowser func(url string) error + PrincipalClaim string + Scopes []string + Server string + ServerName string + Timeout time.Duration + type OIDCVerifier struct + Config OIDCConfig + DB *store.DB + HTTP *http.Client + func NewOIDCVerifier(db *store.DB, cfg OIDCConfig) (*OIDCVerifier, error) + func (v *OIDCVerifier) Verify(token string) (Identity, error) type Verifier + func NewVerifier(db *store.DB, jwtKeyFile string, cfg OIDCConfig) (Verifier, error) v1.0.0 Sep 19, 2026 Changes in this version + const HashPrefix + func Authenticate(doc *UsersFile, principal, token string) error + func FindDefaultRemote(cfg *remoteapi.AuthConfig) (*remoteapi.RemoteConfig, bool) + func GenerateKey() (string, error) + func GenerateToken() (string, error) + func HashToken(token string) string + func LoadAuthConfig(path string) (*remoteapi.AuthConfig, error) + func LoadKey(path string) ([]byte, error) + func SaveAuthConfig(path string, cfg *remoteapi.AuthConfig) error + func SaveUsers(path string, doc *UsersFile) error + func UpsertRemote(cfg *remoteapi.AuthConfig, remote remoteapi.RemoteConfig) + func UpsertUser(doc *UsersFile, user User) + func VerifyToken(token, hash string) bool + type Identity struct + JTI string + Principal string + Role string + type Issuer struct + DB *store.DB + Key []byte + func (i Issuer) Issue(principal, role string, ttl time.Duration) (string, Identity, error) + type StoreVerifier struct + DB *store.DB + Key []byte + func (v StoreVerifier) Verify(token string) (Identity, error) + type User struct + Principal string + Scopes []string + TokenHash string + type UsersFile struct + SchemaVersion int + Users []User + func LoadUsers(path string) (*UsersFile, error) + type Verifier interface + Verify func(token string) (Identity, error)