Documentation ¶
Index ¶
- Constants
- func Assert(condition bool, message string)
- func CancelRequest(r *http.Request) error
- func DecodeAndComparePasswords(plainTextPassword string, encodedPassword string, encodedSalt string, ...) (bool, error)
- func DecodeJwt(rawToken string) (string, error)
- func GenerateAuthCookie(userId int) (*http.Cookie, error)
- func GenerateEncodedSaltAndPasswordHash(password string, config AuthConfig) (encodedPassword string, encodedSalt string, err error)
- func GenerateJwt(userId string) (string, error)
- func GeneratePasswordHash(password string, salt []byte, config AuthConfig) []byte
- func GenerateSalt(length int32) ([]byte, error)
- func GetFunctionName(function any) string
- func ReadEnv()
- type AuthConfig
- type UserJwt
Constants ¶
View Source
const CancelRequestKey = "cancel_request"
Variables ¶
This section is empty.
Functions ¶
func CancelRequest ¶
func GenerateAuthCookie ¶
TODO: More Generic: Update to Take in a value
func GenerateEncodedSaltAndPasswordHash ¶
func GenerateEncodedSaltAndPasswordHash(password string, config AuthConfig) (encodedPassword string, encodedSalt string, err error)
func GenerateJwt ¶
func GeneratePasswordHash ¶
func GeneratePasswordHash(password string, salt []byte, config AuthConfig) []byte
func GenerateSalt ¶
func GetFunctionName ¶
Types ¶
type AuthConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.