Documentation ¶
Index ¶
- func HasGroupOrApiToken(group string, handler http.HandlerFunc) http.HandlerFunc
- func IsGroupOrApiTokenCond(r *http.Request, group string) bool
- func IsSubjectOrGroupOrApiToken(w http.ResponseWriter, r *http.Request, subject string, group string) error
- func LoggedIn(handler http.HandlerFunc) http.HandlerFunc
- func LoggedInOrApiToken(handler http.HandlerFunc) http.HandlerFunc
- func WithTimeout(timeout time.Duration, handler http.HandlerFunc) http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasGroupOrApiToken ¶
func HasGroupOrApiToken(group string, handler http.HandlerFunc) http.HandlerFunc
func IsSubjectOrGroupOrApiToken ¶
func IsSubjectOrGroupOrApiToken(w http.ResponseWriter, r *http.Request, subject string, group string) error
IsSubjectOrGroupOrApiToken cannot be used as a filter because the subject needs to be loaded from the database first (part of the attendee admin data). Use in your handler functions.
Do not forget to return from the handler if an error is returned!
func LoggedIn ¶
func LoggedIn(handler http.HandlerFunc) http.HandlerFunc
func LoggedInOrApiToken ¶
func LoggedInOrApiToken(handler http.HandlerFunc) http.HandlerFunc
func WithTimeout ¶
func WithTimeout(timeout time.Duration, handler http.HandlerFunc) http.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.