Versions in this module Expand all Collapse all v0 v0.3.0 Nov 27, 2026 Changes in this version + var ErrNoRole = errors.New("no such role") + var ErrNoSigningKey = errors.New("no signing key in controller.api.security.signing_keys") + var Group = command.Register(...) + type Claims struct + Audience []string + EffectivePermissions []string + ExpiresAt time.Time + IssuedAt time.Time + KeyID string + Permissions []string + Roles []types.Role + Subject string + Targets []string + func Validate(ctx context.Context, d Deps, in ValidateInput) (Claims, error) + type Config interface + CustomRoles func() (authtoken.CustomRoles, error) + SigningKeys func(ctx context.Context) (authtoken.Keys, error) + type Deps struct + Audit func(ctx context.Context, e audit.Entry) error + Config Config + Tokens Tokens + type GenerateInput struct + Permissions []string + Roles []types.Role + Subject string + Targets []string + type GenerateOutput struct + KeyID string + Permissions []string + Roles []types.Role + Subject string + Targets []string + Token string + func Generate(ctx context.Context, d Deps, in GenerateInput) (GenerateOutput, error) + type Tokens interface + Generate func(key authtoken.Key, roles []types.Role, subject string, permissions []string, ...) (string, error) + Validate func(tokenString string, keys authtoken.Keys) (*authtoken.CustomClaims, error) + type ValidateInput struct + Token secret.Value