jwt

package
v0.0.0-...-1551971 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(secretKey string) token.Service

New --

Types

type Claims

type Claims struct {
	*jwt.StandardClaims
	UserID  int64 `json:"user_id"`
	IsAdmin bool  `json:"is_admin"`
}

Claims --

type Token

type Token struct {
	*jwt.Token
	// contains filtered or unexported fields
}

Token --

func (Token) ExpireAt

func (t Token) ExpireAt() int64

ExpireAt --

func (Token) IsAdmin

func (t Token) IsAdmin() bool

IsAdmin --

func (Token) Signed

func (t Token) Signed() string

Signed --

func (Token) UserID

func (t Token) UserID() int64

UserID --

func (Token) Verify

func (t Token) Verify() bool

Verify --

Jump to

Keyboard shortcuts

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