Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func GetJWTToken(email string, w http.ResponseWriter) string
- func GetUsernameFromEmail(email string) string
- func HashPassword(password string) (string, error)
- func Hasher(bv []byte) string
- func IsAuthorized(user models.TokenManager, w http.ResponseWriter, r *http.Request) bool
- func JWTTokenCheck(tokenStr string, w http.ResponseWriter)
- func JWTTokenUpdate(tokenStr string, w http.ResponseWriter)
- type Claims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
bcrypt password comparison
func GetUsernameFromEmail ¶
func HashPassword ¶
bcrypt password hashing with salt
func IsAuthorized ¶
func IsAuthorized(user models.TokenManager, w http.ResponseWriter, r *http.Request) bool
API Authorization with JWT Token and username
func JWTTokenCheck ¶
func JWTTokenCheck(tokenStr string, w http.ResponseWriter)
Checking JWT Token validity
func JWTTokenUpdate ¶
func JWTTokenUpdate(tokenStr string, w http.ResponseWriter)
Updating JWT Token
Types ¶
Click to show internal directories.
Click to hide internal directories.