Versions in this module Expand all Collapse all v0 v0.11.2 Jul 10, 2026 Changes in this version + func MapErrors(slogger *slog.Logger, next ErrorHandlerFunc) http.HandlerFunc + type ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request) error v0.11.1 Jul 8, 2026 Changes in this version + const ValidationModeRole + const ValidationModeScope + func GetActorIdentityFromRequest(r *http.Request) (string, bool) + func GetAudienceFromRequest(r *http.Request) (string, bool) + func GetEmailFromRequest(r *http.Request) (string, bool) + func GetFirstNameFromRequest(r *http.Request) (string, bool) + func GetIdpOrgRefFromRequest(r *http.Request) (string, bool) + func GetLastNameFromRequest(r *http.Request) (string, bool) + func GetOrgHandleFromRequest(r *http.Request) (string, bool) + func GetOrgNameFromRequest(r *http.Request) (string, bool) + func GetOrganizationFromRequest(r *http.Request) (string, bool) + func GetPlatformRolesFromRequest(r *http.Request) ([]string, bool) + func GetRolesFromRequest(r *http.Request) ([]string, bool) + func GetScopeFromRequest(r *http.Request) (string, bool) + func GetSubClaimFromRequest(r *http.Request) (string, bool) + func GetUserIDFromRequest(r *http.Request) (string, bool) + func GetUsernameFromRequest(r *http.Request) (string, bool) + func InitClaimsAuthz() + func InitScopeAuthz() + func LoadRoleScopeMap(path string) (map[string][]string, error) + func LocalJWTAuthMiddleware(config AuthConfig) func(http.Handler) http.Handler + func NewTestContextMiddleware(next http.Handler) http.Handler + func OrganizationResolverMiddleware(resolve OrgUUIDResolver) func(http.Handler) http.Handler + func PlatformClaimsMiddleware(claimNames PlatformClaimNames) func(http.Handler) http.Handler + func RequireOrganization(organizationParam string) func(http.Handler) http.Handler + func ScopeEnforcer(registry *ScopeRegistry, cfg ScopeEnforcerConfig) func(http.Handler) http.Handler + func ValidateRoleScopeMap(m map[string][]string, registry *ScopeRegistry) error + func WithOrganization(r *http.Request, org string) *http.Request + func WithUserID(r *http.Request, id string) *http.Request + type AuthConfig struct + OrganizationClaimName string + SecretKey string + SkipPaths []string + SkipValidation bool + TokenIssuer string + type Authenticator interface + Middleware func() []func(http.Handler) http.Handler + type CustomClaims struct + Audience string + Email string + FirstName string + JTI string + LastName string + Organization string + Scope string + Username string + func GetClaimsFromRequest(r *http.Request) (*CustomClaims, bool) + type JWTAuthenticator struct + func NewJWTAuthenticator(handlers ...func(http.Handler) http.Handler) *JWTAuthenticator + func (a *JWTAuthenticator) Middleware() []func(http.Handler) http.Handler + type OrgUUIDResolver func(orgClaim string) (string, bool) + type PlatformClaimNames struct + EmailClaim string + OrgHandleClaim string + OrgNameClaim string + OrganizationClaim string + RoleScopeMap map[string][]string + RolesClaimPath string + ScopeClaim string + UserIDClaim string + UsernameClaim string + type ScopeEnforcerConfig struct + Enabled bool + ValidationMode string + type ScopeRegistry struct + func LoadScopeRegistry(specPath string) (*ScopeRegistry, error) + func LoadScopeRegistryFromBytes(data []byte) (*ScopeRegistry, error) + func (r *ScopeRegistry) AllScopes() map[string]struct{} + func (r *ScopeRegistry) Lookup(method, path string) ([]string, bool) + func (r *ScopeRegistry) Merge(other *ScopeRegistry) v0.11.0-cloud1 Jul 8, 2026