validator

package
v2.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorityConfig added in v2.21.0

type AuthorityConfig struct {
	Authority string        `yaml:"authority" json:"authority"`
	HTTP      client.Config `yaml:"http" json:"http"`
}

func (*AuthorityConfig) Validate added in v2.21.0

func (c *AuthorityConfig) Validate() error

type Config

type Config struct {
	Audience  string            `yaml:"audience" json:"audience"`
	Endpoints []AuthorityConfig `yaml:"endpoints" json:"endpoints"`
	Authority *string           `yaml:"authority,omitempty" json:"authority,omitempty"` // deprecated
	HTTP      *client.Config    `yaml:"http,omitempty" json:"http,omitempty"`           // deprecated
}

func (*Config) Validate

func (c *Config) Validate() error

type Validator

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

Validator Client.

func New

func New(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, logger log.Logger, tracerProvider trace.TracerProvider) (*Validator, error)

func (*Validator) AddCloseFunc

func (v *Validator) AddCloseFunc(f func())

AddCloseFunc adds a function to be called by the Close method. This eliminates the need for wrapping the Client.

func (*Validator) Close

func (v *Validator) Close()

func (*Validator) GetParser added in v2.21.0

func (v *Validator) GetParser() *jwtValidator.Validator

func (*Validator) OpenIDConfiguration

func (v *Validator) OpenIDConfiguration() []openid.Config

func (*Validator) Parse

func (v *Validator) Parse(token string) (jwt.MapClaims, error)

func (*Validator) ParseWithClaims

func (v *Validator) ParseWithClaims(token string, claims jwt.Claims) error

Jump to

Keyboard shortcuts

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