middleware

package
v0.0.0-...-31b9ebf Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandleResult

type HandleResult struct {
	// Tells that the request didn't passed the handler and should be filtered
	ShouldFilterRequest bool
	// The status code to return in case ShouldFilterRequest is true.
	StatusCode int
	Reason     string
}

type Handler

type Handler interface {
	Name() string
	Handle(ctx context.Context, r *http.Request) (result *HandleResult, err error)
}

type JWTValidator

type JWTValidator struct {
	*oidc.IDTokenVerifier
	// contains filtered or unexported fields
}

JWTValidator is an implementation of Verifier that validates access based JWT tokens.

func NewJWTValidator

func NewJWTValidator(teamName string, certsURL string, audTags []string) *JWTValidator

func (*JWTValidator) Handle

func (v *JWTValidator) Handle(ctx context.Context, r *http.Request) (*HandleResult, error)

func (*JWTValidator) Name

func (v *JWTValidator) Name() string

Jump to

Keyboard shortcuts

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