Documentation ¶
Index ¶
- func CheckSession(fn func(string, http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func CloseSession(fn func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func CreateSession(id interface{}) (string, string, error)
- func Init(accessSecret, refreshSecret string, ...)
- type Session
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSession ¶
func CheckSession(fn func(string, http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
CheckSession is a middleware that checks session token and passes its value to the decorated router function
func CloseSession ¶
func CloseSession(fn func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
CloseSession receives an JWT encoded token and finishes this session
func CreateSession ¶
CreateSession creates a new session and returns the JWT access and refresh token
Types ¶
Click to show internal directories.
Click to hide internal directories.