Documentation
¶
Index ¶
- Constants
- func CheckCurrentUser(config *apiConfig.Config, mongo *database.MongoDB) gin.HandlerFunc
- func ComparePasswordAndHash(password string, encodedHash string) (bool, error)
- func CreateSuperuser(mongo *database.MongoDB, email string)
- func GenerateFromPassword(password string) (string, error)
- func GenerateRandomBytes(n uint32) ([]byte, error)
- func GenerateRandomPassword(i int) string
- func GenerateRoutes(relativePath string, r *gin.Engine, handler *Handler)
- func GenerateToken(ttl time.Duration, payload JWTData, JWTSecretKey string) (string, error)
- func ResetSuperuserPassword(mongo *database.MongoDB, email string)
- type Argon
- type ChangePasswordRequest
- type Handler
- type JWTClaims
- type JWTData
- type LoginRequest
Constants ¶
View Source
const ( MEMORY = 64 * 1024 ITERATIONS = 3 PARALLELISM = 2 SALTLENGTH = 16 KEYLENGTH = 32 )
Variables ¶
This section is empty.
Functions ¶
func CheckCurrentUser ¶
func ComparePasswordAndHash ¶
func CreateSuperuser ¶
func GenerateFromPassword ¶
func GenerateRandomBytes ¶
func GenerateRandomPassword ¶
func GenerateToken ¶
func ResetSuperuserPassword ¶
Types ¶
type ChangePasswordRequest ¶
type JWTClaims ¶
type JWTClaims struct { Data JWTData `json:"data"` jwt.StandardClaims }
type LoginRequest ¶
Click to show internal directories.
Click to hide internal directories.