jwt

package
v0.0.0-...-76fc54f Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewToken

func NewToken(nationID string, secret string) (string, error)

NewToken creates a new JWT token.

Types

type Claims

type Claims struct {
	NationID string `json:"nationID"`
	jwt.StandardClaims
}

Claims is a custom claims struct for JWT tokens.

func ParseToken

func ParseToken(tokenString string, secret string) (*Claims, error)

ParseToken parses a JWT token.

Jump to

Keyboard shortcuts

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