jwt

package
v0.0.0-...-9727b55 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken  = errors.New("token is invalid")
	ErrInvalidIssuer = errors.New("issuer has invalid")
)

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Iss  string    `json:"iss"`
	Sub  uuid.UUID `json:"sub"`
	Name string    `json:"name"`
	Iat  int       `json:"iat"`
}

func ValidateToken

func ValidateToken(tokenString string, issuer string, secret string) (*Payload, error)

Jump to

Keyboard shortcuts

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