validator

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NilClaimsValidator               = errors.New("claims validator cannot be nil")
	IsRefreshTokenClaimNotValidError = errors.New("irt not valid")
	IdClaimNotValidError             = errors.New("jwt_id not valid")
	MustBeAccessTokenError           = errors.New("must be access token")
	MustBeRefreshTokenError          = errors.New("must be refresh token")
	TokenExpiredError                = errors.New("token expired")
)

Functions

This section is empty.

Types

type DefaultClaimsValidator

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

DefaultClaimsValidator struct

func NewDefaultClaimsValidator

func NewDefaultClaimsValidator(
	authTokenSource *oauth.TokenSource,
	authClient pbauth.AuthClient,
	redisTokenValidator gojwtredisauth.TokenValidator,
) (*DefaultClaimsValidator, error)

NewDefaultClaimsValidator creates a new default claims validator

func (*DefaultClaimsValidator) ValidateClaims

func (d *DefaultClaimsValidator) ValidateClaims(
	claims *jwt.MapClaims,
	interception gojwtinterception.Interception,
) (bool, error)

ValidateClaims validates the claims

Jump to

Keyboard shortcuts

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