adapters

package
v0.0.0-...-b4fdffc Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnespectedSigninMethod    = errors.New("unespected signin method")
	ErrInvalidKey                = errors.New("key is invalid")
	ErrInvalidKeyType            = errors.New("key is of invalid type")
	ErrHashUnavailable           = errors.New("the requested hash function is unavailable")
	ErrTokenMalformed            = errors.New("token is malformed")
	ErrTokenUnverifiable         = errors.New("token is unverifiable")
	ErrTokenSignatureInvalid     = errors.New("token signature is invalid")
	ErrTokenRequiredClaimMissing = errors.New("token is missing required claim")
	ErrTokenInvalidAudience      = errors.New("token has invalid audience")
	ErrTokenExpired              = errors.New("token is expired")
	ErrTokenUsedBeforeIssued     = errors.New("token used before issued")
	ErrTokenInvalidIssuer        = errors.New("token has invalid issuer")
	ErrTokenInvalidSubject       = errors.New("token has invalid subject")
	ErrTokenNotValidYet          = errors.New("token is not valid yet")
	ErrTokenInvalidId            = errors.New("token has invalid id")
	ErrTokenInvalidClaims        = errors.New("token has invalid claims")
	ErrInvalidType               = errors.New("invalid type for claim")
	ErrTokenInvalid              = errors.New("token invalid")
)

Functions

This section is empty.

Types

type JWEAdapter

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

JWEAdapter is struct for adapter

func NewJWEAdapter

func NewJWEAdapter() *JWEAdapter

NewJWEAdapter return new jwt adapter

func (*JWEAdapter) Decrypt

func (j *JWEAdapter) Decrypt(token string) (string, error)

func (*JWEAdapter) Init

func (j *JWEAdapter) Init() error

type JWTAdapter

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

JWTAdapter is struct for adapter

func NewJWTAdapter

func NewJWTAdapter() *JWTAdapter

NewJWTAdapter return new jwt adapter

func (*JWTAdapter) VerifyToken

func (j *JWTAdapter) VerifyToken(tokenString string) (jwt.Claims, error)

VerifyToken verify token signature

Jump to

Keyboard shortcuts

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