Documentation ¶
Index ¶
- func EraseExpiredTokens(conn interfaces.Conn) error
- func GetRequestToken(r *http.Request, isAccessToken bool, s *sessions.Session) (string, models.TokenType)
- func GetRequestUser(r *http.Request, conn interfaces.Conn, s *sessions.Session) (*models.User, bool)
- func IsTokenValid(tokenID string, tokenType models.TokenType, conn interfaces.Conn) (bool, bson.ObjectId)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EraseExpiredTokens ¶
func EraseExpiredTokens(conn interfaces.Conn) error
EraseExpiredTokens removes all expired tokens from the database
func GetRequestToken ¶
func GetRequestToken(r *http.Request, isAccessToken bool, s *sessions.Session) (string, models.TokenType)
GetRequestToken returns the token associated with the request
func GetRequestUser ¶
func GetRequestUser(r *http.Request, conn interfaces.Conn, s *sessions.Session) (*models.User, bool)
GetRequestUser returns the user associated with the request
func IsTokenValid ¶
func IsTokenValid(tokenID string, tokenType models.TokenType, conn interfaces.Conn) (bool, bson.ObjectId)
IsTokenValid returns if the provided token is a valid token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.