type
AuthStrategy
type AuthStrategy struct {
// Name is a stable lowercase kebab-case identifier used in diagnostics.
Name string
// Authenticate returns Authenticated false when the request does not belong
// to this strategy. It must not return raw credentials or untrusted user data.
Authenticate func(AuthStrategyContext) (AuthStrategyResult, error)
}One compiled application-owned request authentication strategy.
Source core/auth_contract.go:93
Strategies run in declaration order after built-in session and API-key authentication. Return Authenticated false when the request does not belong to the strategy.
Related types
AuthStrategyContextNormalized request input for a custom authentication strategy.
AuthStrategyResultResult of one custom authentication strategy.