jwtutil

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNewToken

func GenerateNewToken(secret, id string, expires int64, credentials []string) (string, error)

GenerateNewToken func for generate a new Access token.

Types

type Setting

type Setting struct {
	Secret            string
	SecretExpireHours int
}

type TokenMetadata

type TokenMetadata struct {
	ID      string
	Expires int64
}

TokenMetadata struct to describe metadata in JWT.

func ExtractTokenMetadata

func ExtractTokenMetadata(c *fiber.Ctx, secret string) (*TokenMetadata, error)

ExtractTokenMetadata func to extract metadata from JWT.

Jump to

Keyboard shortcuts

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