jwt_utils

package
v0.0.0-...-53e80a7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWTToken

func GenerateJWTToken(hmacSecret []byte, uuid string, ad time.Duration) (string, time.Time, error)

GenerateJWTToken Generate the `access token` for the secret key.

func GenerateJWTTokenPair

func GenerateJWTTokenPair(hmacSecret []byte, uuid string, ad time.Duration, rd time.Duration) (string, time.Time, string, time.Time, error)

GenerateJWTTokenPair Generate the `access token` and `refresh token` for the secret key.

func ProcessJWTToken

func ProcessJWTToken(hmacSecret []byte, reqToken string) (string, error)

ProcessJWTToken validates either the `access token` or `refresh token` and returns either the `uuid` if success or error on failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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