Documentation ¶
Index ¶
- type Auth
- type CookieGenerator
- type RestApi
- func (api *RestApi) ExtendSession(w http.ResponseWriter, r *http.Request)
- func (api *RestApi) Game(w http.ResponseWriter, r *http.Request)
- func (api *RestApi) Quiz(w http.ResponseWriter, r *http.Request)
- func (api *RestApi) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (api *RestApi) Session(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) Authenticated ¶
Returns true if the credentials are correct
func (*Auth) Base64Authenticated ¶
Just like the Authenticated function - except it expects the argument to be in the following format - Base64(username:password) Returns true if the credentials are correct
func (*Auth) BasicAuth ¶
func (auth *Auth) BasicAuth(nextHandler http.HandlerFunc) http.HandlerFunc
Copied from https://stackoverflow.com/a/39591234
func (*Auth) IsDisabled ¶
type CookieGenerator ¶
type CookieGenerator struct {
// contains filtered or unexported fields
}
func InitCookieGenerator ¶
func InitCookieGenerator(next func(w http.ResponseWriter, r *http.Request)) *CookieGenerator
func (CookieGenerator) ServeHTTP ¶
func (s CookieGenerator) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RestApi ¶
type RestApi struct {
// contains filtered or unexported fields
}
func InitRestApi ¶
func InitRestApi(hub messaging.MessageHub) *RestApi
func (*RestApi) ExtendSession ¶
func (api *RestApi) ExtendSession(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.