auth

package
v0.0.0-...-8bbbfba Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAuthHeaderIncluded = errors.New("not auth header included in request")

ErrNoAuthHeaderIncluded -

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) error

CheckPasswordHash -

func GetBearerToken

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

GetBearerToken -

func HashPassword

func HashPassword(password string) (string, error)

HashPassword -

func MakeJWT

func MakeJWT(userID int, tokenSecret string, expiresIn time.Duration) (string, error)

MakeJWT -

func ValidateJWT

func ValidateJWT(tokenString, tokenSecret string) (string, error)

ValidateJWT -

Types

This section is empty.

Jump to

Keyboard shortcuts

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