Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JWTExtractToken ¶
JWTExtractToken extracts token from authorization header
func SendPasswordResetMail ¶
SendPasswordResetMail Sends link for reseting password to user's mail
func SendVerificationMail ¶
SendVerificationMail Generates random code and sends to passed user's email
func SetNewPassword ¶
SetNewPassword Sets the new password to the owner of the email
Types ¶
type JWTAccessDetails ¶
JWTAccessDetails Defines JWT token details
func JWTGetTokenDetails ¶
func JWTGetTokenDetails(jwtToken string) (*JWTAccessDetails, error)
JWTGetTokenDetails Extracts token details
func JWTHasValidRefreshToken ¶
func JWTHasValidRefreshToken(jwtToken string) (*JWTAccessDetails, error)
JWTHasValidRefreshToken checks whether given token is valid
func JWTHasValidToken ¶
func JWTHasValidToken(jwtToken string) (*JWTAccessDetails, error)
JWTHasValidToken checks whether given token is valid
func (*JWTAccessDetails) Delete ¶
func (jwtTD *JWTAccessDetails) Delete() error
Delete deletes token from fast storage (Currently Redis)
func (*JWTAccessDetails) Save ¶
func (jwtTD *JWTAccessDetails) Save() error
Save saves token into fast storage (Currently Redis)
type JWTTokens ¶
type JWTTokens struct { Access JWTAccessDetails Refresh JWTAccessDetails }
JWTTokens defines struct for easy refresh and access token detail manipulation
func JWTCreateToken ¶
JWTCreateToken Creates and returns JWT token