jaht

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(userID string, expirationTime time.Duration, secretKey []byte) (string, error)

GenerateToken generates a new JWT token

func JwtMiddleware

func JwtMiddleware(next http.Handler, secretKey []byte) http.Handler

JwtMiddleware is a middleware function for validating JWT tokens

func ValidateToken

func ValidateToken(tokenString string, secretKey []byte) (string, error)

ValidateToken validates the JWT token

Types

This section is empty.

Jump to

Keyboard shortcuts

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