authnmappinghandler

package
v0.0.0-...-6d13c91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is the base struct definition of the AuthenticationMappingHandler

func NewHandler

func NewHandler(ctx context.Context, reqDataParser ReqDataParser, httpClient *http.Client, tokenVerifierProvider TokenVerifierProvider, authenticators []authenticator.Config, initialSubdomainsForAuthenticators []cfg.AuthenticatorSubdomainMapping) *Handler

NewHandler constructs the AuthenticationMappingHandler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(writer http.ResponseWriter, req *http.Request)

ServeHTTP missing godoc

type OpenIDMetadata

type OpenIDMetadata struct {
	Issuer  string `json:"issuer"`
	JWKSURL string `json:"jwks_uri"`
}

OpenIDMetadata contains basic metadata for OIDC provider needed during request authentication

type ReqDataParser

type ReqDataParser interface {
	Parse(req *http.Request) (oathkeeper.ReqData, error)
}

ReqDataParser parses request data

type TokenData

type TokenData interface {
	// Claims reads the Claims from the token into the specified struct
	Claims(v interface{}) error
}

TokenData represents the authentication token

type TokenVerifier

type TokenVerifier interface {
	// Verify verifies that the token is valid and returns a token if so, otherwise returns an error
	Verify(ctx context.Context, token string) (TokenData, error)
}

TokenVerifier attempts to verify a token and returns it or an error if the verification was not successful

func DefaultTokenVerifierProvider

func DefaultTokenVerifierProvider(ctx context.Context, metadata OpenIDMetadata) TokenVerifier

DefaultTokenVerifierProvider is the default TokenVerifierProvider which leverages goidc liberay

type TokenVerifierProvider

type TokenVerifierProvider func(ctx context.Context, metadata OpenIDMetadata) TokenVerifier

TokenVerifierProvider defines different ways by which one can provide a TokenVerifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL