jwt

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// TOKEN_KEY returns the jwt token secret
	TOKEN_KEY = "A9VxLvehJEnwMcsfG18=atlXh$FMOe^7M619oDs1g=bcrTWgGNYpnowkog5rA"
	// TOKEN_EXP returns the jwt token expiration duration.
	// Should be time.ParseDuration string. Source: https://golang.org/pkg/time/#ParseDuration
	// default: 10h
	TOKEN_EXP = "10h"
)

Variables

This section is empty.

Functions

func Generate

func Generate() string

Types

type TokenPayload

type TokenPayload struct {
	ID int64
}

func Verify

func Verify(token string) (*TokenPayload, error)

Jump to

Keyboard shortcuts

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