Documentation
¶
Index ¶
- Constants
- func CurrentSession(r *http.Request) *session.Session
- func CurrentToken(r *http.Request) *session.Session
- func DebugHandle(h http.Handler) http.Handler
- func LogHandler(h http.Handler) http.Handler
- func MeasureHandler(h http.Handler) http.Handler
- func NewAuthSessionHandler(sessionStorage session.Storage, must bool) func(http.Handler) http.Handler
- func NewAuthTokenHandler(tokenStorage session.Storage) func(http.Handler) http.Handler
- func NewCORSHandler(domains ...string) func(h http.Handler) http.Handler
- func RecoveryHandler(h http.Handler) http.Handler
- func Use(handler http.Handler, middleware ...func(http.Handler) http.Handler) http.Handler
Constants ¶
View Source
const ( SessionHeader = "Authorization-Session" TokenHeader = "Authorization-Token" )
Variables ¶
This section is empty.
Functions ¶
func CurrentSession ¶
CurrentSession returns the matched session for the current request, if any.
func CurrentToken ¶
CurrentToken returns the matched token for the current request, if any.
func LogHandler ¶
LogHandler adds logging to http requests
func MeasureHandler ¶
MeasureHandler adds measuring to http requests
func NewAuthSessionHandler ¶
func NewAuthSessionHandler(sessionStorage session.Storage, must bool) func(http.Handler) http.Handler
NewAuthSessionHandler creates a AuthSessionHandler for the specified backend. It loads a session from a session key.
func NewAuthTokenHandler ¶
NewAuthTokenHandler creates a AuthTokenHandler for the specified It loads a session from a token key.
func NewCORSHandler ¶
LogHandler adds logging to http requests
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.