Documentation ¶
Index ¶
- Variables
- type AuthenticationSession
- type Authenticator
- type AuthenticatorAnonymous
- type AuthenticatorCookieSession
- type AuthenticatorCookieSessionConfiguration
- type AuthenticatorCookieSessionFilter
- type AuthenticatorJWT
- type AuthenticatorJWTRegistry
- type AuthenticatorNoOp
- type AuthenticatorOAuth2ClientCredentials
- type AuthenticatorOAuth2Configuration
- type AuthenticatorOAuth2Introspection
- type AuthenticatorOAuth2IntrospectionConfiguration
- type AuthenticatorOAuth2IntrospectionResult
- type AuthenticatorOAuth2JWTConfiguration
- type AuthenticatorUnauthorized
- type Registry
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthenticatorNotEnabled = herodot.DefaultError{ ErrorField: "authenticator matching this route is misconfigured or disabled", CodeField: http.StatusInternalServerError, StatusField: http.StatusText(http.StatusInternalServerError), }
View Source
var ErrAuthenticatorNotResponsible = errors.New("Authenticator not responsible")
Functions ¶
This section is empty.
Types ¶
type AuthenticationSession ¶
type Authenticator ¶
type Authenticator interface { Authenticate(r *http.Request, config json.RawMessage, rule pipeline.Rule) (*AuthenticationSession, error) GetID() string Validate() error }
type AuthenticatorAnonymous ¶
type AuthenticatorAnonymous struct {
// contains filtered or unexported fields
}
func NewAuthenticatorAnonymous ¶
func NewAuthenticatorAnonymous(c configuration.Provider) *AuthenticatorAnonymous
func (*AuthenticatorAnonymous) Authenticate ¶
func (a *AuthenticatorAnonymous) Authenticate(r *http.Request, config json.RawMessage, _ pipeline.Rule) (*AuthenticationSession, error)
func (*AuthenticatorAnonymous) GetID ¶
func (a *AuthenticatorAnonymous) GetID() string
func (*AuthenticatorAnonymous) Validate ¶
func (a *AuthenticatorAnonymous) Validate() error
type AuthenticatorCookieSession ¶
type AuthenticatorCookieSession struct {
// contains filtered or unexported fields
}
func NewAuthenticatorCookieSession ¶
func NewAuthenticatorCookieSession(c configuration.Provider) *AuthenticatorCookieSession
func (*AuthenticatorCookieSession) Authenticate ¶
func (a *AuthenticatorCookieSession) Authenticate(r *http.Request, config json.RawMessage, _ pipeline.Rule) (*AuthenticationSession, error)
func (*AuthenticatorCookieSession) GetID ¶
func (a *AuthenticatorCookieSession) GetID() string
func (*AuthenticatorCookieSession) Validate ¶
func (a *AuthenticatorCookieSession) Validate() error
type AuthenticatorCookieSessionFilter ¶
type AuthenticatorCookieSessionFilter struct { }
type AuthenticatorJWT ¶
type AuthenticatorJWT struct {
// contains filtered or unexported fields
}
func NewAuthenticatorJWT ¶
func NewAuthenticatorJWT( c configuration.Provider, r AuthenticatorJWTRegistry, ) *AuthenticatorJWT
func (*AuthenticatorJWT) Authenticate ¶
func (a *AuthenticatorJWT) Authenticate(r *http.Request, config json.RawMessage, _ pipeline.Rule) (*AuthenticationSession, error)
func (*AuthenticatorJWT) GetID ¶
func (a *AuthenticatorJWT) GetID() string
func (*AuthenticatorJWT) Validate ¶
func (a *AuthenticatorJWT) Validate() error
type AuthenticatorJWTRegistry ¶
type AuthenticatorJWTRegistry interface { credentials.VerifierRegistry }
type AuthenticatorNoOp ¶
type AuthenticatorNoOp struct {
// contains filtered or unexported fields
}
func NewAuthenticatorNoOp ¶
func NewAuthenticatorNoOp(c configuration.Provider) *AuthenticatorNoOp
func (*AuthenticatorNoOp) Authenticate ¶
func (a *AuthenticatorNoOp) Authenticate(r *http.Request, config json.RawMessage, _ pipeline.Rule) (*AuthenticationSession, error)
func (*AuthenticatorNoOp) GetID ¶
func (a *AuthenticatorNoOp) GetID() string
func (*AuthenticatorNoOp) Validate ¶
func (a *AuthenticatorNoOp) Validate() error
type AuthenticatorOAuth2ClientCredentials ¶
type AuthenticatorOAuth2ClientCredentials struct {
// contains filtered or unexported fields
}
func NewAuthenticatorOAuth2ClientCredentials ¶
func NewAuthenticatorOAuth2ClientCredentials(c configuration.Provider) *AuthenticatorOAuth2ClientCredentials
func (*AuthenticatorOAuth2ClientCredentials) Authenticate ¶
func (a *AuthenticatorOAuth2ClientCredentials) Authenticate(r *http.Request, config json.RawMessage, _ pipeline.Rule) (*AuthenticationSession, error)
func (*AuthenticatorOAuth2ClientCredentials) GetID ¶
func (a *AuthenticatorOAuth2ClientCredentials) GetID() string
func (*AuthenticatorOAuth2ClientCredentials) Validate ¶
func (a *AuthenticatorOAuth2ClientCredentials) Validate() error
type AuthenticatorOAuth2Configuration ¶
type AuthenticatorOAuth2Configuration struct { // Scopes is an array of OAuth 2.0 scopes that are required when accessing an endpoint protected by this rule. // If the token used in the Authorization header did not request that specific scope, the request is denied. Scopes []string `json:"required_scope"` }
type AuthenticatorOAuth2Introspection ¶
type AuthenticatorOAuth2Introspection struct {
// contains filtered or unexported fields
}
func NewAuthenticatorOAuth2Introspection ¶
func NewAuthenticatorOAuth2Introspection(c configuration.Provider) *AuthenticatorOAuth2Introspection
func (*AuthenticatorOAuth2Introspection) Authenticate ¶
func (a *AuthenticatorOAuth2Introspection) Authenticate(r *http.Request, config json.RawMessage, _ pipeline.Rule) (*AuthenticationSession, error)
func (*AuthenticatorOAuth2Introspection) GetID ¶
func (a *AuthenticatorOAuth2Introspection) GetID() string
func (*AuthenticatorOAuth2Introspection) Validate ¶
func (a *AuthenticatorOAuth2Introspection) Validate() error
type AuthenticatorOAuth2IntrospectionConfiguration ¶
type AuthenticatorOAuth2IntrospectionConfiguration struct { // An array of OAuth 2.0 scopes that are required when accessing an endpoint protected by this handler. // If the token used in the Authorization header did not request that specific scope, the request is denied. Scopes []string `json:"required_scope"` // An array of audiences that are required when accessing an endpoint protected by this handler. // If the token used in the Authorization header is not intended for any of the requested audiences, the request is denied. Audience []string `json:"target_audience"` // The token must have been issued by one of the issuers listed in this array. Issuers []string `json:"trusted_issuers"` }
type AuthenticatorOAuth2IntrospectionResult ¶
type AuthenticatorOAuth2IntrospectionResult struct { Active bool `json:"active"` Extra map[string]interface{} `json:"ext"` Subject string `json:"sub,omitempty"` Username string `json:"username"` Audience []string `json:"aud"` TokenType string `json:"token_type"` Issuer string `json:"iss"` ClientID string `json:"client_id,omitempty"` Scope string `json:"scope,omitempty"` }
type AuthenticatorOAuth2JWTConfiguration ¶
type AuthenticatorOAuth2JWTConfiguration struct { // An array of OAuth 2.0 scopes that are required when accessing an endpoint protected by this handler. // If the token used in the Authorization header did not request that specific scope, the request is denied. Scope []string `json:"required_scope"` // An array of audiences that are required when accessing an endpoint protected by this handler. // If the token used in the Authorization header is not intended for any of the requested audiences, the request is denied. Audience []string `json:"target_audience"` // The token must have been issued by one of the issuers listed in this array. Issuers []string `json:"trusted_issuers"` AllowedAlgorithms []string `json:"allowed_algorithms"` }
type AuthenticatorUnauthorized ¶
type AuthenticatorUnauthorized struct {
// contains filtered or unexported fields
}
func NewAuthenticatorUnauthorized ¶
func NewAuthenticatorUnauthorized(c configuration.Provider) *AuthenticatorUnauthorized
func (*AuthenticatorUnauthorized) Authenticate ¶
func (a *AuthenticatorUnauthorized) Authenticate(r *http.Request, config json.RawMessage, _ pipeline.Rule) (*AuthenticationSession, error)
func (*AuthenticatorUnauthorized) GetID ¶
func (a *AuthenticatorUnauthorized) GetID() string
func (*AuthenticatorUnauthorized) Validate ¶
func (a *AuthenticatorUnauthorized) Validate() error
Click to show internal directories.
Click to hide internal directories.