jwt

package
v1.9.87 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTokenExpired #
	ErrTokenExpired = errors.New("Token is expired")
	// ErrTokenNotValid #
	ErrTokenNotValid = errors.New("Token is not valid")
)

Functions

This section is empty.

Types

type JWToken

type JWToken struct {
	RawData string
	Head    TMap
	Claims  TMap
}

JWToken with HS256

func New

func New() *JWToken

New #

func (*JWToken) Clear

func (t *JWToken) Clear()

Clear #

func (*JWToken) Encode

func (t *JWToken) Encode(key string) string

Encode #

func (*JWToken) Expired

func (t *JWToken) Expired() int64

Expired #

func (*JWToken) Parse

func (t *JWToken) Parse(s string) error

Parse #

func (*JWToken) Valid

func (t *JWToken) Valid(key string) error

Valid #

type TMap

type TMap map[string]interface{}

TMap #

func (*TMap) AsBase64

func (d *TMap) AsBase64() string

AsBase64 #

func (*TMap) AsInt64

func (d *TMap) AsInt64(key string) int64

AsInt64 #

func (*TMap) Assign

func (d *TMap) Assign(m *map[string]interface{})

Assign #

Jump to

Keyboard shortcuts

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