Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoginGoogle ¶
func LoginGoogle(w http.ResponseWriter, r *http.Request)
LoginGoogle allows a user to log in using their Google credentials. If the login succeeds a session ID cookie is placed on the user's browser. As long as this cookie is present in subsequent requests the user is considered logged in.
func Logout ¶
func Logout(w http.ResponseWriter, r *http.Request)
Logout handles requests to log a user out. It works by expiring the session ID cookie, if one exists.
func Ping ¶
func Ping(w http.ResponseWriter, r *http.Request)
Ping returns "pong". It serves as a health check.
func SessionInfo ¶
func SessionInfo(w http.ResponseWriter, r *http.Request)
SessionInfo returns the contents of a session cookie.
Types ¶
type LoginGoogleRequest ¶
type LoginGoogleRequest struct {
IDToken string `json:"idtoken"`
}
LoginGoogleRequest represents the request body for /login/google
type LoginGoogleResponse ¶
type LoginGoogleResponse struct {
Success bool `json:"success"`
}
LoginGoogleResponse represents the response body for /login/google
Click to show internal directories.
Click to hide internal directories.