handler

package
v0.0.0-...-4632cca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2016 License: MIT Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL