google

package
v0.0.0-...-7cde619 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoogleOauthRedirectURL

func GetGoogleOauthRedirectURL() (string, error)

func GetGoogleOauthState

func GetGoogleOauthState() (string, error)

func GetGoogleOauthTokenByCode

func GetGoogleOauthTokenByCode(code string) (*oauth2.Token, error)

func GetGoogleOauthURL

func GetGoogleOauthURL() (string, error)

func IsValidGoogleOauthState

func IsValidGoogleOauthState(state string) error

func ValidateGoogleOauthIDToken

func ValidateGoogleOauthIDToken(idToken string) (*idtoken.Payload, error)

Types

type GoogleUserInfo

type GoogleUserInfo struct {
	Sub           string `json:"sub"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	Picture       string `json:"picture"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	Locale        string `json:"locale"`
}

func GetUserInfoByToken

func GetUserInfoByToken(token string) (*GoogleUserInfo, error)

Jump to

Keyboard shortcuts

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