google

package
v0.0.0-...-f284455 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderType = "google"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID     string `json:"client-id"`
	ClientSecret string `json:"client-secret"`
	RedirectURI  string `json:"redirect-uri"`
}

func (*Config) New

type Credentials

type Credentials struct {
	Email string `json:"email"`
}

func (Credentials) UID

func (c Credentials) UID() string

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func (*Provider) Callback

func (*Provider) Login

func (p *Provider) Login(w http.ResponseWriter, r *http.Request, authReq storage.AuthRequest)

func (*Provider) Logout

func (p *Provider) Logout(w http.ResponseWriter, r *http.Request, authReq storage.AuthRequest)

func (*Provider) Register

func (p *Provider) Register(w http.ResponseWriter, r *http.Request, authReq storage.AuthRequest)

func (*Provider) Type

func (p *Provider) Type() string

type UserInfo

type UserInfo struct {
	Sub           string `json:"sub"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Picture       string `json:"picture"`
	Profile       string `json:"profile"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	Gender        string `json:"gender"`
}

Jump to

Keyboard shortcuts

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