validator

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func NewJwtValidatorLogger

func NewJwtValidatorLogger(name string) *Logger

NewJwtValidatorLogger creates a new JWT validator logger

func (*Logger) ValidatedToken

func (e *Logger) ValidatedToken()

ValidatedToken logs a message when the server validates a token

type Validator

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

Validator does parsing and validation of JWT token

func NewValidator

func NewValidator(publicKeyPath string) (*Validator, error)

NewValidator returns a new validator by parsing the given file path as an ED25519 public key

func (*Validator) GetToken

func (v *Validator) GetToken(tokenString string, validateClaims func(*jwt.Token) (*jwt.Token, error)) (*jwt.Token, error)

GetToken attempts to get a token from the given string

Jump to

Keyboard shortcuts

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