authmanager

package
v0.0.0-...-0686167 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalJWTKey string

GlobalJWTKey - signature key

Functions

func DecodeJWTToken

func DecodeJWTToken(token string) (jwt.MapClaims, error)

DecodeJWTToken - decode token

func GenerateToken

func GenerateToken(loginID string, ExpiresAt int64) (string, error)

GenerateToken -with claims

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

Claims -payload storing in jwt token

type Options

type Options struct {
	Username  string        `json:"username"`
	ExpiresAt time.Duration `json:"expiresAt"`
}

Options struct

Jump to

Keyboard shortcuts

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