Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthTokenObject ¶
type AuthTokenObject struct { Token string `json:"token" bson:"token,omitempty"` ExpireAt string `json:"expireAt" bson:"expireAt,omitempty"` Payload interface{} `json:"payload" bson:"payload,omitempty"` }
AuthTokenObject - Encapsulated Object
func GenToken ¶
func GenToken(payload interface{}, secret string) (AuthTokenObject, error)
GenToken - A Util function to generate jwtToken which can be used in the request header
func Parse ¶
func Parse(tokenObj AuthTokenObject, secret string) (AuthTokenObject, error)
Parse - Function to Parse JWT
type Claims ¶
type Claims struct { Payload interface{} `json:"payload" bson:"payload,omitempty"` jwtgo.StandardClaims }
Claims - Claims Structure
Click to show internal directories.
Click to hide internal directories.