validation

package
v0.0.0-...-f69229d Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Message string
	Code    ErrorCode
}

func (*Error) Error

func (e *Error) Error() string

type ErrorCode

type ErrorCode int
const (
	ErrorToken ErrorCode = iota
	ErrorAudience
	ErrorIssuer
	ErrorExpired
	ErrorValidation
	ErrorNilAlg
	ErrorNilKid
	ErrorUnsupportedAlg
)

type TokenValidator

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

func NewTokenValidator

func NewTokenValidator(keys *jwk.Set, algorithms []string, audience string, issuer string) *TokenValidator

func (*TokenValidator) Validate

func (tv *TokenValidator) Validate(tokenString string) (*jwt.Token, error)

Jump to

Keyboard shortcuts

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