Documentation ¶
Index ¶
- func AreTokensEqual(tokenOne string, tokenTwo string) bool
- func CheckPassword(hashedPass string, inputPass string) bool
- func CreateErrorResponse(code int, message string) responses.ErrorResponse
- func CreateSuccessResponse(code int, message string, data interface{}) responses.SuccessResponse
- func CreateUserResponse(user *models.User) responses.UserResponse
- func GenerateHashedPassword(password string) (string, error)
- func GenerateToken(username string, role string) (string, string, error)
- func IsAdmin(c *gin.Context) bool
- func IsEmpty(value string) bool
- func IsEqual(valueOne string, valueTwo string) bool
- func IsUser(c *gin.Context) bool
- func IsUserMatchesWith(c *gin.Context, inputUsername string) bool
- func SetAccessAndRefreshTokenCookies(c *gin.Context, accessToken, refreshToken string)
- func ValidateToken(signedToken string) (*authClaims, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreTokensEqual ¶
func CheckPassword ¶
func CreateErrorResponse ¶
func CreateErrorResponse(code int, message string) responses.ErrorResponse
func CreateSuccessResponse ¶
func CreateSuccessResponse(code int, message string, data interface{}) responses.SuccessResponse
func CreateUserResponse ¶
func CreateUserResponse(user *models.User) responses.UserResponse
func GenerateHashedPassword ¶
func ValidateToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.