Documentation ¶
Index ¶
- Variables
- func CheckPasswordHash(password, hash string) error
- func Decode(s string) (string, error)
- func Encode(s string) string
- func GetBearerToken(headers http.Header) (string, error)
- func HashPassword(password string) (string, error)
- func MakeJWT(userID int, tokenSecret string, expiresIn time.Duration, tokenType TokenType) (string, error)
- func RefreshToken(tokenString, tokenSecret string) (string, error)
- func ValidateJWT(tokenString, tokenSecret string) (string, error)
- type TokenType
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAuthHeaderIncluded = errors.New("not auth header included in request")
Functions ¶
func CheckPasswordHash ¶
func HashPassword ¶
func RefreshToken ¶
func ValidateJWT ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.