jwt

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 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) Sign

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

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