token

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserClaimsType = "Claims"
	UserMapsType   = "Maps"
)

-

Variables

This section is empty.

Functions

func NewJwtMap added in v0.6.1

func NewJwtMap(sub string, exp int64, nbf int64) jwt.MapClaims

NewJwtMap - sub - 標題 exp - 過期時間timestamp, 不設置請傳0 nbf - 生效時間timestamp, 不設置請傳0

func SetIssuer

func SetIssuer(iss string)

SetIssuer -

func SetKey

func SetKey(skey string)

SetKey -

Types

type JWT

type JWT interface {
	Create(body interface{}) JWT
	Parse(token string, body interface{}) JWT
	Error() error
	Valid() error
	Get() string
}

JWT -

func NewJWT added in v0.6.1

func NewJWT() JWT

NewJWT -

type JwtClaims added in v0.6.1

type JwtClaims = jwt.Claims

JwtClaims -

type JwtMap added in v0.6.1

type JwtMap = jwt.MapClaims

JwtMap -

Jump to

Keyboard shortcuts

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