token

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Key     []byte
	Options map[string]Option
	Method  = jwt.HS256
)

Functions

func Make

func Make(scene string, claims map[string]interface{}) (token []byte, err error)

func Verify

func Verify(scene string, token []byte, refresh Handle) (claims map[string]interface{}, err error)

Types

type Handle

type Handle func(option Option) (claims map[string]interface{}, err error)

type Option

type Option struct {
	Issuer   string   `yaml:"issuer"`
	Audience []string `yaml:"audience"`
	Expires  uint     `yaml:"expires"`
}

Jump to

Keyboard shortcuts

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