auth

package
v0.62.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package auth provides functions for handling password hashing and JWT authentication

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) (bool, error)

func GetAPIKey

func GetAPIKey(headers http.Header) (string, error)

func GetBearerToken

func GetBearerToken(headers http.Header) (tokenString string, returnErr error)

func HashPassword

func HashPassword(password string) (string, error)

func MakeJWT

func MakeJWT(userID uuid.UUID, method *jwt.SigningMethodHMAC, tokenSecret string, expiresIn time.Duration) (string, error)

func MakeRefreshToken

func MakeRefreshToken() (string, error)

func ValidateJWT

func ValidateJWT(tokenString, tokenSecret, algorithm string) (uuid.UUID, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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