token

package
v0.0.0-...-c0b3d08 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(key []byte, user model.User) string

Types

type CustomClaims

type CustomClaims struct {
	*jwt.StandardClaims

	User model.User
}

func ParseFromRequest

func ParseFromRequest(key []byte, req *http.Request) (CustomClaims, error)

func ParseToken

func ParseToken(unparsedToken string, key []byte) (CustomClaims, error)

Jump to

Keyboard shortcuts

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