Documentation ¶
Index ¶
- func GetAuthenticatedUser(h *HandlerContext, r *http.Request) (*users.User, error)
- func HandleTestPath(w http.ResponseWriter, r *http.Request)
- func LogUser(h *HandlerContext, r *http.Request, u *users.User) error
- type CORS
- type HandlerContext
- func (h *HandlerContext) SessionsHandler(w http.ResponseWriter, r *http.Request)
- func (h *HandlerContext) SpecificSessionHandler(w http.ResponseWriter, r *http.Request)
- func (h *HandlerContext) SpecificUserHandler(w http.ResponseWriter, r *http.Request)
- func (h *HandlerContext) UsersHandler(w http.ResponseWriter, r *http.Request)
- type SessionState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthenticatedUser ¶
GetAuthenticatedUser fetches the session state from the session store and returns authenticated user
func HandleTestPath ¶
func HandleTestPath(w http.ResponseWriter, r *http.Request)
HandleTestPath handles
Types ¶
type CORS ¶
type CORS struct {
// contains filtered or unexported fields
}
CORS struct holds handler that middeware calls
type HandlerContext ¶
HandlerContext is a reciever for HTTP handler functions
func NewHandlerContext ¶
func NewHandlerContext(sessionKey string, sessionStore sessions.Store, userStore users.Store) *HandlerContext
NewHandlerContext is a constructor for handler context receiver
func (*HandlerContext) SessionsHandler ¶
func (h *HandlerContext) SessionsHandler(w http.ResponseWriter, r *http.Request)
SessionsHandler handles requests for the "sessions" resource also logs when a user tries to sign-in
func (*HandlerContext) SpecificSessionHandler ¶
func (h *HandlerContext) SpecificSessionHandler(w http.ResponseWriter, r *http.Request)
SpecificSessionHandler handles requests related to a specific authenticated session
func (*HandlerContext) SpecificUserHandler ¶
func (h *HandlerContext) SpecificUserHandler(w http.ResponseWriter, r *http.Request)
SpecificUserHandler handles requests for a specific user
func (*HandlerContext) UsersHandler ¶
func (h *HandlerContext) UsersHandler(w http.ResponseWriter, r *http.Request)
UsersHandler handles requests for the "users" resoruce
Click to show internal directories.
Click to hide internal directories.