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
Click to show internal directories.
Click to hide internal directories.