jwt

package
v0.0.0-...-12d990b Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(userId int, username string) (string, error)

func GetJWTSecret

func GetJWTSecret() []byte

Types

type Claims

type Claims struct {
	UserId   int    `json:"user_id"`
	Username string `json:"username"`
	jwt.StandardClaims
}

func ParseToken

func ParseToken(token string) (*Claims, error)

func (*Claims) String

func (c *Claims) String() string

Jump to

Keyboard shortcuts

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