Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultValidator ¶ added in v0.4.0
type DefaultValidator struct {
// contains filtered or unexported fields
}
Validator does parsing and validation of JWT token
func NewDefaultValidator ¶ added in v0.4.0
func NewDefaultValidator(publicKey []byte, validateClaims func(*jwt.MapClaims) (*jwt.MapClaims, error)) (*DefaultValidator, error)
NewDefaultValidator returns a new validator by parsing the given file path as an ED25519 public key
func (*DefaultValidator) GetClaims ¶ added in v0.4.0
func (d *DefaultValidator) GetClaims(tokenString string) (*jwt.MapClaims, error)
GetClaims parses and validates the given JWT token string
func (*DefaultValidator) GetToken ¶ added in v0.4.0
func (d *DefaultValidator) GetToken(tokenString string) (*jwt.Token, error)
GetToken parses the given JWT token string
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶ added in v0.3.4
func NewLogger(logger commonlogger.Logger) Logger
NewLogger creates a new JWT validator logger
func (Logger) ValidatedToken ¶
func (l Logger) ValidatedToken()
ValidatedToken logs a message when the server validates a token
Click to show internal directories.
Click to hide internal directories.