jwt

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Secret string `yaml:"secret"`
}

type ConfigJWT

type ConfigJWT struct {
	Base Base `yaml:"jwt"`
}

type JWT

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

func New

func New(c *ConfigJWT) *JWT

func (*JWT) IsExpired

func (s *JWT) IsExpired(err error) bool

func (*JWT) IsNeedUpdate

func (s *JWT) IsNeedUpdate(err error) bool

func (JWT) MarshalEasyJSON added in v1.8.0

func (v JWT) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (JWT) MarshalJSON added in v1.8.0

func (v JWT) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*JWT) Sign

func (s *JWT) Sign(d interface{}, ttl time.Duration) ([]byte, error)

func (*JWT) UnmarshalEasyJSON added in v1.8.0

func (v *JWT) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*JWT) UnmarshalJSON added in v1.8.0

func (v *JWT) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*JWT) Verify

func (s *JWT) Verify(token []byte) (interface{}, string, error)

Jump to

Keyboard shortcuts

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