Documentation ¶
Index ¶
- func GetAuthTokenID(c *gin.Context) string
- func GetAuthTokenLastUpdate(c *gin.Context) time.Time
- func GetLocale(c *gin.Context) string
- func GetPageKey(c *gin.Context) string
- func GetUserID(c *gin.Context) string
- func IsUserAuthenticated(c *gin.Context) bool
- func SaveAuthToken(cookieName, secret string) gin.HandlerFunc
- func SaveLocale(contextLocale string) gin.HandlerFunc
- func SavePageKey(pageKey string) gin.HandlerFunc
- func SaveUnknownLocale(supportedLocales []string, defaultLocale string) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthTokenID ¶
GetAuthTokenID : returns the auth token ID from a request.
func GetAuthTokenLastUpdate ¶
GetAuthTokenLastUpdate : returns the last update of the auth token from a request.
func GetPageKey ¶
GetPageKey : returns the unique key of the target page from the context.
func IsUserAuthenticated ¶
IsUserAuthenticated : returns true if the userID is defined into the JWT token.
func SaveAuthToken ¶
func SaveAuthToken(cookieName, secret string) gin.HandlerFunc
SaveAuthToken : returns a middleware which saves the auth token from the request to the context.
func SaveLocale ¶
func SaveLocale(contextLocale string) gin.HandlerFunc
SaveLocale : saves the locale of the target page to the context.
func SavePageKey ¶
func SavePageKey(pageKey string) gin.HandlerFunc
SavePageKey : saves the unique key of the target page to the context.
func SaveUnknownLocale ¶
func SaveUnknownLocale(supportedLocales []string, defaultLocale string) gin.HandlerFunc
SaveUnknownLocale : saves the locale of the target page to the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.