jwt

package module
v0.0.0-...-6feaae8 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

jwt

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Secret   string `toml:"secret"`
	Lifetime int    `toml:"lifetime"`
}

type Jwt

type Jwt struct {
	Conf   Config
	Secret []byte
}

func New

func New(conf Config) *Jwt

func (*Jwt) Token

func (j *Jwt) Token(data map[string]interface{}) (string, error)

func (*Jwt) Verify

func (j *Jwt) Verify(tokenStr string) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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