validator

package
v2.25.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCustomDistributionPointVerification added in v2.25.0

func WithCustomDistributionPointVerification(dpVerification pkgX509.CustomDistributionPointVerification) func(o *Options)

func WithCustomTokenIssuerClients added in v2.23.0

func WithCustomTokenIssuerClients(clients map[string]jwtValidator.TokenIssuerClient) func(o *Options)

func WithGetOpenIDConfiguration added in v2.23.0

func WithGetOpenIDConfiguration(f GetOpenIDConfigurationFunc) func(o *Options)

Types

type AuthorityConfig added in v2.21.0

type AuthorityConfig struct {
	Authority string            `yaml:"authority" json:"authority"`
	HTTP      pkgTls.HTTPConfig `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"`
	TokenVerification TokenTrustVerificationConfig `yaml:"tokenTrustVerification,omitempty" json:"tokenTrustVerification,omitempty"`
	Authority         *string                      `yaml:"authority,omitempty" json:"authority,omitempty"` // deprecated
	HTTP              *pkgTls.HTTPConfig           `yaml:"http,omitempty" json:"http,omitempty"`           // deprecated
}

func (*Config) Validate

func (c *Config) Validate() error

type GetOpenIDConfigurationFunc added in v2.23.0

type GetOpenIDConfigurationFunc func(ctx context.Context, c *http.Client, authority string) (openid.Config, error)

type Options added in v2.23.0

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

type TokenTrustVerificationConfig added in v2.23.0

type TokenTrustVerificationConfig struct {
	CacheExpiration time.Duration `yaml:"cacheExpiration,omitempty" json:"cacheExpiration,omitempty"`
}

func (*TokenTrustVerificationConfig) Validate added in v2.23.0

func (c *TokenTrustVerificationConfig) 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, opts ...func(o *Options)) (*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(ctx context.Context, token string, claims jwt.Claims) error

Jump to

Keyboard shortcuts

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