jwt

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type New

type New struct {
	PrivateKey []byte //Private key
	PublicKey  []byte //Public key
	Exp        int64  //Expiration timestamp
}

New Jwt parameter

func Default

func Default(PublicKey, PrivateKey []byte, exp ...int64) *New

Default function

func (*New) Decode

func (get *New) Decode(tokenStr string) (manifest map[string]interface{}, err error)

Decode json web token decryption<json web token解密>

func (*New) Encrypt

func (get *New) Encrypt(manifest map[string]interface{}) (string, error)

Encrypt json web token encryption<json web token 加密>

Jump to

Keyboard shortcuts

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