google

package
v0.0.0-...-ed0f25c Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package google provides OKs and tokens for Google Single-Sign On.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(ctx context.Context, r *http.Request) context.Context

Context returns a context that is updated with a Google Sign-In token from the given HTTP request, if it exists.

func Show

func Show(ctx context.Context) (string, bool)

Show reports the value of the verified credentials, if any.

func VerifyEmail

func VerifyEmail(ok okay.OK, emails ...string) okay.OK

VerifyEmail returns an OK that will verify users whose Google account is tied to the address listed.

Types

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	RedirectURI  string
	LogoutPath   string
}

func (*Config) RegisterHandlers

func (c *Config) RegisterHandlers(path string) error

RegisterHandlers registers Google Sign-In handlers. The given path is the landing URL to begin the sign-in flow, and the return handler is registered at the URL listed in the config.

Jump to

Keyboard shortcuts

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