Documentation ¶
Overview ¶
Package oauth implements functions to diagnose the supported OAuth2 flows (web and installed app flows) in a Google Ads API client library client environment.
Package oauth contains functions that are specific to web OAuth flow. The web flow initially prompts user to login, grant permission, and redirects user back to the redirect URL specified in Google Cloud project.
Package oauth contains functions that are specific to web OAuth flow. The web flow initially prompts user to login, grant permission, and redirects user back to the redirect URL specified in Google Cloud project.
Index ¶
Constants ¶
const ( AccessNotPermittedForManagerAccount = iota GoogleAdsAPIDisabled InvalidClientInfo InvalidRefreshToken InvalidCustomerID MissingDevToken Unauthenticated UnknownError GoogleAdsApiScope = "https://www.googleapis.com/auth/adwords" )
This is a list of error codes (not comprehensive) returned by Google OAuth2 endpoint based on Google Ads API scope.
const (
// InstalledAppRedirectURL is the redirect URL for the web flow.
InstalledAppRedirectURL = "urn:ietf:wg:oauth:2.0:oob"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { ConfigFile diag.ConfigFile CustomerID string OAuthType string Verbose bool }
Config is a required configuration for diagnosing the OAuth2 flow based on the client library configuration.
func (*Config) SimulateOAuthFlow ¶
func (c *Config) SimulateOAuthFlow()
SimulateOAuthFlow simulates the OAuth2 flows supported by the Google Ads API client libraries.
type ConfigWriter ¶ added in v1.0.4
ConfigWriter allows replacement of key by a given value in a configuration.