auth

package
v0.0.0-...-dd0ba2e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPassword

func HashPassword(password string) (string, error)

func IssueJWT

func IssueJWT(issuer string, userId int, signingSecret string, expiresIn time.Duration) (string, error)

func ParseApiKey

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

func ParseBearerToken

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

func ValidateJWT

func ValidateJWT(token string, signingSecret string) (jwt.Token, jwt.Claims, error)

func ValidatePassword

func ValidatePassword(password string, hashedPassword string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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