package
0.0.0-20220711013302-91b88386b5b6
Repository: https://github.com/rs401/letsgorip.git
Documentation: pkg.go.dev

# Functions

CreateToken takes an ID and generates a Tokens.
ExtractRefreshToken extracts an refresh token from request cookie.
ExtractToken extracts an access token from request header.
ExtractUserId takes a http.Request and returns the corresponding user id.
RefreshAccessToken takes a refresh token and updates the expiry time of the access token.
StillValid takes a jwt.Token and verifies it hasn't expired.
VerifyRefreshToken verifies a refresh token is legit.
VerifyToken verifies a token is legit.

# Structs

Claims holds a UserId and standard claims.
Tokens holds an access token and a refresh token.