util_jwt

package
v0.0.0-...-92aa097 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Jwt

type Jwt struct {
	SecretKey string
}
var JwtTool Jwt

func NewJwtTool

func NewJwtTool(secretKey string) Jwt

new a jwt tool object

func (Jwt) GenerateJWT

func (j Jwt) GenerateJWT(claims map[string]interface{}) (string, error)

GenerateJWT generate a jwt string

func (*Jwt) SetSecretKey

func (j *Jwt) SetSecretKey(secretKey string)

func (Jwt) ValidateJWT

func (j Jwt) ValidateJWT(t string) (*jwt.Token, string)

ValidateJWT validates jwt string

Jump to

Keyboard shortcuts

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