google

package
v0.0.0-...-9326ec9 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2017 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GoogleTokenInfoUrl = "https://www.googleapis.com/oauth2/v1/tokeninfo"
)
View Source
const (
	GoogleUserInfoUrl = "https://www.googleapis.com/plus/v1/people/me"
)

Variables

This section is empty.

Functions

func GoogleTokenInfo

func GoogleTokenInfo(token string) (types.OauthProviderTokenInfo, error)

func GoogleUserInfo

func GoogleUserInfo(token string) (types.OauthProviderUserInfo, error)

Types

type GoogleOauthTokenInfo

type GoogleOauthTokenInfo struct {
	Audience  string `json:"audience"`
	IssuedTo  string `json:"issued_to"`
	UserId    string `json:"user_id"`
	Scope     string `json:"scope"`
	Expires   int64  `json:"expires_in"`
	UserEmail string `json:"email"`
	Access    string `json:"access_type"`
	Verified  bool   `json:"verified_email"`
}

func (*GoogleOauthTokenInfo) IsValid

func (i *GoogleOauthTokenInfo) IsValid() bool

type GoogleOauthUserInfo

type GoogleOauthUserInfo struct {
	UserEmail      string `json:"email"`
	UserGivenName  string `json:"givenName"`
	UserFamilyName string `json:"familyName"`
	UserGender     string `json:"gender"`
}

func (*GoogleOauthUserInfo) Email

func (i *GoogleOauthUserInfo) Email() string

func (*GoogleOauthUserInfo) FamilyName

func (i *GoogleOauthUserInfo) FamilyName() string

func (*GoogleOauthUserInfo) GivenName

func (i *GoogleOauthUserInfo) GivenName() string

Jump to

Keyboard shortcuts

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