jwt

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToken

func CheckToken(secretKey string, tokenStr string, decode TokenSubjectDecode) (any, error)

func GenToken

func GenToken(subject string, issuer string, secretKey string, expire time.Duration) string

Types

type TokenInvalidError

type TokenInvalidError struct {
}

func (TokenInvalidError) Error

func (t TokenInvalidError) Error() string

type TokenSubjectDecode

type TokenSubjectDecode func(subject string) (any, error)

Jump to

Keyboard shortcuts

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