Versions in this module Expand all Collapse all v2 v2.7.0 Jul 20, 2026 Changes in this version + const HeaderAssertedCaller + const UsersFileSchemaVersion + var Anonymous = Caller + var ErrAssertedCallerForbidden = errors.New("auth: caller is not permitted to assert identities") + var ErrAssertedCallerUnknown = errors.New("auth: asserted identity is not provisioned") + var ErrUnauthenticated = errors.New("auth: unauthenticated") + func Authorize(c Caller, a Action, acl SessionACL) bool + func ProxyByFromContext(ctx context.Context) (by string, ok bool) + func WithCaller(ctx context.Context, c Caller) context.Context + func WithProxyBy(ctx context.Context, by string) context.Context + type Action int + const ActionDaemonAdmin + const ActionSessionAdmin + const ActionSessionList + const ActionSessionRead + const ActionSessionWrite + func (a Action) String() string + type AnonymousAuth struct + Caller Caller + func (a AnonymousAuth) Authenticate(_ *http.Request) (Caller, error) + type Authenticator interface + Authenticate func(r *http.Request) (Caller, error) + type AuthenticatorWithProxy interface + CanProxyAs func(c Caller) bool + type BearerTokenAuth struct + func NewBearerTokenAuth(users []User, adminIdentities, proxyIdentities []string) *BearerTokenAuth + func (b *BearerTokenAuth) Authenticate(r *http.Request) (Caller, error) + func (b *BearerTokenAuth) CanProxyAs(c Caller) bool + func (b *BearerTokenAuth) HasIdentity(identity string) bool + func (b *BearerTokenAuth) LookupIdentity(identity string) (Caller, bool) + type Caller struct + Admin bool + Identity string + Labels map[string]string + func CallerFromContext(ctx context.Context) (c Caller, ok bool) + type SessionACL struct + Contributors []string + Owner string + Viewers []string + type User struct + Identity string + Labels map[string]string + Token string + type UsersFile struct + Users []User + Version int + func LoadUsersFile(path string) (*UsersFile, error) v2.7.0-dev.5 Jul 20, 2026