accesstoken

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SecretKey = []byte("secret")
)

Functions

func GenerateToken

func GenerateToken(id int) (string, error)

GenerateToken generates a jwt token and assign a username to it's claims and return it

func ParseToken

func ParseToken(tokenStr string) (float64, error)

ParseToken parses a jwt token and returns the username in it's claims

Types

This section is empty.

Jump to

Keyboard shortcuts

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