Documentation ¶
Index ¶
- func ComparePasswordAndHash(password, encodedHash string) (match bool, err error)
- func ExtractToken(r *http.Request) string
- func GenerateHash(password string) (encodedHash string, err error)
- func GenerateTokenPair(subject string) (string, string, error)
- func JwtMiddleware(next http.Handler) http.Handler
- func RefreshTokens(refreshToken string) (string, string, error)
- func TokenValid(r *http.Request) error
- func VerifyAccessToken(r *http.Request) (*jwt.Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePasswordAndHash ¶
ComparePasswordAndHash compares plaintext and its store hash
func GenerateHash ¶
GenerateHash creates the key train
func GenerateTokenPair ¶
GenerateTokenPair generates access and refresh tokens
func JwtMiddleware ¶
JwtMiddleware validates token in transit
func RefreshTokens ¶
RefreshTokens ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.