identity

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator added in v1.7.0

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

func NewValidator added in v1.7.0

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

func (*Validator) Validate added in v1.7.0

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

TokenVerification verifies the incoming token request right now we are supporting the admin token, the k8s /login token from cloud-api and the new keycloak token TODO: remove support for k8s cloud-api /login and the admin token

type ValidatorConfig added in v1.7.0

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 added in v1.7.0

type ValidatorOption func(validator *Validator)

func JWTClientValidatorOpt added in v1.7.0

func JWTClientValidatorOpt(signingKey string) ValidatorOption

Jump to

Keyboard shortcuts

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