security

package
v0.0.0-...-f213815 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JWT_SECRET   = "d7830ad5791dsdsds"
	JWT_EXP_HOUR = 1
	JWT_EXP_MIN  = 0
	JWT_EXP_SEC  = 30
)

Variables

This section is empty.

Functions

func GetClaims

func GetClaims(token *jwt.Token) (jwt.MapClaims, error)

GetClaims get claims information

func NewToken

func NewToken(id int, role string) (string, error)

NewToken create a new token

func ParseToken

func ParseToken(tokenString string) (*jwt.Token, error)

ParseToken parse a token

Types

This section is empty.

Jump to

Keyboard shortcuts

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