utils

package
v0.0.0-...-ee5fcd5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(ttl time.Duration, privateKey string, userId uuid.UUID) (string, error)

func HashPassword

func HashPassword(password string) (string, error)

func HashRefreshToken

func HashRefreshToken(refreshToken string) (string, error)

func ValidateToken

func ValidateToken(token string, publicKey string) (*jwt.Token, error)

func VerifyPassword

func VerifyPassword(encoded string, password string) (bool, error)

func VerifyRefreshToken

func VerifyRefreshToken(encoded string, refreshToken string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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