Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrJWTExtract = errors.New("Error while extracting values from JWT Token")
ErrJWTExtract is an error thrown
var ErrJWTSigning = errors.New("Error while signing the JWT Token")
ErrJWTSigning is an error thrown during the JWT Signing process
Functions ¶
func ExtractToken ¶
ExtractToken takes a JWT Token that is used by the application and extracts the values out with the application secret. If process goes well, it would be able to return the values
func NewToken ¶
NewToken creates a new JWT token that is to be used by the application id generally refer to a string to be stored - in this case is user id exp is the expiry in the number of seconds after its issue issuer is to specify the application that is providing this token as an identifier secret is to seal everything into the token
Types ¶
type JWTCustomClaims ¶
type JWTCustomClaims struct { ID string `json:"id"` jwt.StandardClaims }
JWTCustomClaims contains the list of values that is to be contained within the JWT Token