identity

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

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

func NewValidator

func NewValidator(cfg ValidatorConfig, opts ...ValidatorOption) (*Validator, error)

func (*Validator) Validate

func (svc *Validator) Validate(r *http.Request) (jwt.MapClaims, error)

Validate verifies the incoming token request

type ValidatorConfig

type ValidatorConfig struct {
	ClientID      string `split_words:"true" required:"true"`
	ConnectionURL string `split_words:"true" required:"true"`
	Issuer        string `split_words:"true" required:"false"`

	// Optional Skip Checks
	SkipClientIDCheck bool `split_words:"true" default:"false"`
	SkipExpiryCheck   bool `split_words:"true" default:"false"`
	SkipIssuerCheck   bool `split_words:"true" default:"false"`
}

type ValidatorOption

type ValidatorOption func(validator *Validator)

func JWTClientValidatorOpt added in v2.0.3

func JWTClientValidatorOpt(signingKey string) ValidatorOption

Jump to

Keyboard shortcuts

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