jwtutil

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: GPL-3.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 JWT

type JWT struct {
	// contains filtered or unexported fields
}

func New

func New(secret string) *JWT

func (*JWT) MustSign

func (j *JWT) MustSign(data Value) string

签名,如果出错则panic

func (*JWT) MustUnSign

func (j *JWT) MustUnSign(signedStr string) Value

解析签名,如果出错则panic

func (*JWT) Sign

func (j *JWT) Sign(data Value) (string, error)

签名

func (*JWT) UnSign

func (j *JWT) UnSign(signedStr string) (Value, error)

解析签名

type Value

type Value = map[string]interface{}

Jump to

Keyboard shortcuts

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