Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) error
- func GetAPIKey(headers http.Header) (string, error)
- func GetBearerToken(headers http.Header) (string, error)
- func HashPassword(password string) (string, error)
- func MakeJWT(userID uuid.UUID, tokenSecret string, expiresIn time.Duration) (string, error)
- func MakeRefreshToken() (string, error)
- func TestGetBearerToken(t *testing.T)
- func TestHashPassword(t *testing.T)
- func TestJWTCreationAndValidation(t *testing.T)
- func ValidateJWT(tokenString, tokenSecret string) (uuid.UUID, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash compares a plain text password with a hashed password
func HashPassword ¶
HashPassword takes a plain text password and returns a hashed version
func MakeRefreshToken ¶
MakeRefreshToken generates a secure random 256-bit (32-byte) hex-encoded string.
func TestGetBearerToken ¶
func TestHashPassword ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.