Documentation ¶
Index ¶
- func GenerateSession(w http.ResponseWriter, r *http.Request, token string) error
- func IsUserAllowed(r *http.Request, w http.ResponseWriter, requirements ...string) (bool, user.User)
- func Logout(w http.ResponseWriter, r *http.Request) error
- func ParseSessions(r *http.Request, w http.ResponseWriter) (user.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSession ¶
GenerateSession generates a session based off a JWT-token
func IsUserAllowed ¶
func IsUserAllowed(r *http.Request, w http.ResponseWriter, requirements ...string) (bool, user.User)
IsUserAllowed determines if the currently logged in user meets a set of requirements
func Logout ¶
func Logout(w http.ResponseWriter, r *http.Request) error
Logout allows for a user to logout and destroy their session
func ParseSessions ¶
ParseSessions takes a http request, extracts the session data from it, parses it and returns a user object
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.