jwt

package
v0.0.0-...-b682b13 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToken

func CheckToken(tokenString string, secret string) (bool, error)

CheckToken

@Description: check jwt token
@param tokenString : jwt to be checked
@param secret : your own secret
@return bool
@return error

func GenerateToken

func GenerateToken(data interface{}, secret string) (string, error)

GenerateToken

@Description: generate jwt token
@param data : user claims
@param secret : your own secret
@return string
@return error

func ParseToken

func ParseToken(token string, secret string) (jwt.MapClaims, error)

ParseToken

@Description:
@param token : jwt to be parsed
@param secret : your own secret
@return jwt.MapClaims : user claims
@return error

Types

This section is empty.

Jump to

Keyboard shortcuts

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