jwt

package
v0.0.0-...-e7df039 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Signature string
	Typ       interface{}   // 声明类型
	Alg       interface{}   // 声明加密算法
	Iss       interface{}   // 签发者
	Sub       interface{}   // 主题
	Aud       interface{}   // 接受者
	Iat       time.Time     // 生成签名时间
	Nbf       time.Time     // 生效时间(定义在什么时间之前, JWT不可用, 需要晚于签发时间)
	Jti       interface{}   // 编号(唯一身份标识, 识别一次行token, 避免重复攻击)
	Inf       interface{}   // 自定义内容
	Exp       time.Duration // 多少时间过期(时,分,秒)
	// contains filtered or unexported fields
}

func New

func New() *Component

func NewJwT

func NewJwT(name string) *Component

func (*Component) Parse

func (c *Component) Parse(d string) (*mJwT.Headers, *mJwT.Payload, error)

func (*Component) Produce

func (c *Component) Produce() (interface{}, error)

func (*Component) Refresh

func (c *Component) Refresh(d string) (interface{}, error)

Jump to

Keyboard shortcuts

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