auth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware() gin.HandlerFunc

AuthMiddleware validates the JWT token

func ComparePassword

func ComparePassword(hashed, raw string) bool

ComparePassword compares hashed password with raw input

func GenerateToken

func GenerateToken() (string, error)

GenerateToken creates a new JWT token for admin

func HashPassword

func HashPassword(password string) (string, error)

HashPassword hashes a raw password

Types

This section is empty.

Jump to

Keyboard shortcuts

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