token

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RevokedTokens = make(map[string]bool)

Functions

func CreateToken

func CreateToken(userId uint64) (string, error)

CreateToken return jwt token

Types

type Token

type Token struct {
	*jwt.Token
}

func ParseToken

func ParseToken(tokenString string) (Token, error)

func (*Token) IsExpired

func (t *Token) IsExpired() (bool, error)

func (*Token) UserId

func (t *Token) UserId() (uint64, error)

Jump to

Keyboard shortcuts

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