auth0

package
v1.60.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidAudience for Auth0.
	ErrInvalidAudience = errors.New("invalid audience")

	// ErrInvalidIssuer for Auth0.
	ErrInvalidIssuer = errors.New("invalid issuer")

	// ErrInvalidAlgorithm for Auth0.
	ErrInvalidAlgorithm = errors.New("invalid algorithm")
)
View Source
var ErrInvalidResponse = errors.New("invalid response")

ErrInvalidResponse from Auth0.

View Source
var ErrMissingCertificate = errors.New("missing certificate")

ErrMissingCertificate from Auth0.

Functions

func NewGenerator

func NewGenerator(params GeneratorParams) jwt.Generator

NewGenerator for Auth0.

func NewVerifier

func NewVerifier(cfg *Config, cert Certificator) jwt.Verifier

NewVerifier for Auth0.

Types

type Certificator

type Certificator interface {
	Certificate(ctx context.Context, token *jwt.Token) (string, error)
}

Certificator for Auth0.

func NewCertificator

func NewCertificator(params CertificatorParams) Certificator

NewCertificator for Auth0.

type CertificatorParams added in v1.52.0

type CertificatorParams struct {
	fx.In

	Config     *Config
	HTTPConfig *http.Config
	Logger     *zap.Logger
	Cache      *ristretto.Cache
	Tracer     opentracing.Tracer
}

CertificatorParams for Auth0.

type Config

type Config struct {
	URL           string `yaml:"url"`
	ClientID      string `yaml:"client_id"`
	ClientSecret  string `yaml:"client_secret"`
	Audience      string `yaml:"audience"`
	Issuer        string `yaml:"issuer"`
	Algorithm     string `yaml:"algorithm"`
	JSONWebKeySet string `yaml:"json_web_key_set"`
}

Config for Auth0.

func (*Config) CacheKey

func (c *Config) CacheKey(prefix string) string

CacheKey for config.

type GeneratorParams added in v1.52.0

type GeneratorParams struct {
	fx.In

	Config     *Config
	HTTPConfig *http.Config
	Logger     *zap.Logger
	Cache      *ristretto.Cache
	Tracer     opentracing.Tracer
}

GeneratorParams for Auth0.

Jump to

Keyboard shortcuts

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