middlewares

package
v0.0.0-...-b8be85b Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(userID uint, email string, expiration time.Duration) (string, error)

GenerateJWT generates a JWT token with a given expiration or defaults to 24 hours

func GenerteJWTSecret

func GenerteJWTSecret() (string, error)

GenerteJWTSecret generates a secure random secret key and sets it as an environment variable.

func RequireAuth

func RequireAuth(c *fiber.Ctx) error

RequireAuth checks for a valid 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