Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.Common.Lib.OAuth2ProviderForApplications Class Reference

Legacy base class for OAuth provider. Maintained for backward compatibility purposes. More...

Inheritance diagram for Google.Api.Ads.Common.Lib.OAuth2ProviderForApplications:
Google.Api.Ads.Common.Lib.OAuth2ProviderBase Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl Google.Api.Ads.Common.Lib.AdsOAuthProviderForServiceAccounts Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications Google.Api.Ads.Common.Lib.AdsOAuthProvider Google.Api.Ads.Common.Lib.AdsOAuthProvider Google.Api.Ads.Common.Lib.Configurable Google.Api.Ads.Common.Lib.Configurable

Public Member Functions

 OAuth2ProviderForApplications (AppConfig config)
 Initializes a new instance of the OAuth2ProviderForApplications class. More...
 
- Public Member Functions inherited from Google.Api.Ads.Common.Lib.OAuth2ProviderBase
 OAuth2ProviderBase (AppConfig config)
 Initializes a new instance of the OAuth2ProviderBase class. More...
 
- Public Member Functions inherited from Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl
 AdsOAuthProviderImpl (AppConfig config)
 Initializes a new instance of the AdsOAuthProvider class. More...
 
string GetAuthorizationUrl ()
 Gets the authorization URL. More...
 
bool FetchAccessAndRefreshTokens (string authorizationCode)
 Fetches the access and optionally the refresh token if applicable. More...
 
void RevokeRefreshToken ()
 Revokes the refresh token if offline mode is used. More...
 
void RefreshAccessToken ()
 Refreshes the access token if expiring. More...
 
void RefreshAccessTokenInOfflineMode ()
 Refreshes the access token if offline mode is used. More...
 
void GenerateAccessTokenForServiceAccount ()
 Generates the access token for service account. More...
 
void RefreshAccessTokenIfExpiring ()
 Refreshes the access token if expiring. More...
 
virtual string GetAuthHeader ()
 Gets the OAuth authorization header to be used with HTTP requests. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl
virtual string CreateAuthorizationUrl ()
 Creates the authorization URL. More...
 
virtual TokenResponse ExchangeCodeForToken (string code)
 Exchanges the authorization code for access and refresh tokens. More...
 
virtual TokenResponse GetAccessTokenForAuthorizationCodeFlow ()
 Refreshes the access token in authorization code flow. More...
 
virtual TokenResponse GetAccessTokenForServiceAccount ()
 Gets the access token in service account flow. More...
 
virtual void RevokeRefreshToken (string refreshToken)
 Revokes the refresh token asynchronously. More...
 
- Protected Attributes inherited from Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl
readonly AdsFeatureUsageRegistry featureUsageRegistry
 The registry for saving feature usage information.. More...
 
- Properties inherited from Google.Api.Ads.Common.OAuth.AdsOAuthProviderImpl
IHttpClientFactory HttpClientFactory [get, set]
 The HttpClientFactory used for requesting access tokens. More...
 
IClock Clock [get, set]
 The clock used for requesting access tokens. More...
 
AppConfig Config = SystemClock.Default [get]
 Gets the application configuration class for this object. More...
 
string ClientId [get, set]
 Gets or sets the client that is making the request. This value is obtained from the Google Cloud Console during application registration. More...
 
string ClientSecret [get, set]
 Gets or sets the client secret obtained from the Google Cloud Console during application registration. More...
 
string Scope [get, set]
 Gets or sets the API access your application is requesting. This is space delimited. More...
 
string State [get, set]
 Gets or sets a parameter that your application can use for keeping state. The OAuth authorization server roundtrips this parameter. More...
 
string TokenType [get]
 Gets the type of token returned by the server. This field will always have the value Bearer for now. More...
 
string AccessToken [get, set]
 Gets or sets the token that can be sent to a Google API for authentication. More...
 
DateTime UpdatedOn [get, set]
 Gets or sets the time at which access token was retrieved. More...
 
int ExpiresIn [get, set]
 Gets the remaining lifetime on the access token. More...
 
OAuthTokensObtainedCallback OnOAuthTokensObtained [get, set]
 Callback triggered when this provider obtains a new access token or refresh token from the OAuth server. More...
 
bool IsOffline [get, set]
 Indicates if your application needs to access APIs when the user is not present at the browser. This is defaulted to true. More...
 
string RedirectUri = true [get, set]
 Gets or sets where the url where the response is sent. This should be a registered redirect uri on the Google Cloud Console. More...
 
string RefreshToken [get, set]
 Gets or sets a token that may be used to obtain a new access token. Refresh tokens are valid until the user revokes access. More...
 
string ServiceAccountEmail [get]
 Gets the service account email for which access token should be retrieved. More...
 
string PrnEmail [get, set]
 Gets or sets the email of the account for which the call is being made. More...
 
string JwtPrivateKey [get]
 Gets or sets the JWT private key. More...
 
- Properties inherited from Google.Api.Ads.Common.Lib.AdsOAuthProviderForServiceAccounts
string ServiceAccountEmail [get]
 Gets the service account email for which access token should be retrieved. More...
 
string PrnEmail [get, set]
 Gets or sets the email of the account for which the call is being made. More...
 
- Properties inherited from Google.Api.Ads.Common.Lib.AdsOAuthProvider
string ClientId [get, set]
 Gets or sets the client that is making the request. This value is obtained from the API console during application registration. More...
 
string ClientSecret [get, set]
 Gets or sets the client secret obtained from the API console during application registration.during application registration. More...
 
string Scope [get, set]
 Gets or sets the API access your application is requesting. This is space delimited. More...
 
string State [get, set]
 Gets or sets a parameter that your application can use for keeping state. The OAuth Authorization Server roundtrips this parameter. More...
 
string TokenType [get]
 Gets the type of token returned by the server. This field will always have the value Bearer for now. More...
 
string AccessToken [get, set]
 Gets or sets the token that can be sent to a Google API for authentication. More...
 
DateTime UpdatedOn [get, set]
 Gets or sets the time at which access token was retrieved. More...
 
int ExpiresIn [get, set]
 Gets the remaining lifetime on the access token. More...
 
OAuthTokensObtainedCallback OnOAuthTokensObtained [get]
 Callback triggered when this provider obtains a new access token or refresh token from the OAuth server. More...
 
- Properties inherited from Google.Api.Ads.Common.Lib.Configurable
AppConfig Config [get]
 Gets the application configuration class for this object. More...
 
- Properties inherited from Google.Api.Ads.Common.Lib.AdsOAuthProviderForApplications
bool IsOffline [get, set]
 Indicates if your application needs to access APIs when the user is not present at the browser. This is defaulted to true. More...
 
string RedirectUri [get, set]
 Gets or sets where the url where the response is sent. This should be a registered redirect uri on the API console. More...
 
string RefreshToken [get, set]
 Gets or sets a token that may be used to obtain a new access token. Refresh tokens are valid until the user revokes access. More...
 

Detailed Description

Legacy base class for OAuth provider. Maintained for backward compatibility purposes.

Constructor & Destructor Documentation

Google.Api.Ads.Common.Lib.OAuth2ProviderForApplications.OAuth2ProviderForApplications ( AppConfig  config)
inline

Initializes a new instance of the OAuth2ProviderForApplications class.

Parameters
configThe configuration.

The documentation for this class was generated from the following file: