Documentation ¶
Index ¶
- Variables
- func AuthRequired() gin.HandlerFunc
- func ClearUserID(c *gin.Context)
- func GetCSRFTokenInput(c *gin.Context) template.HTML
- func GetUserID(c *gin.Context) string
- func SetUserID(c *gin.Context, userID string)
- func Setup(conf *Conf) error
- func Use(r gin.IRoutes, conf *Conf)
- type Conf
- type RedisConf
Constants ¶
This section is empty.
Variables ¶
View Source
var LogInSession redis.Store
LogInSession is a redis store for user sessions
Functions ¶
func AuthRequired ¶
func AuthRequired() gin.HandlerFunc
AuthRequired is a middleware to check there is a logged in user in the current session
func ClearUserID ¶
ClearUserID remove a user session (effectively logging out the user)
func GetCSRFTokenInput ¶
GetCSRFTokenInput returns a hidden input tag with the token
Types ¶
Click to show internal directories.
Click to hide internal directories.