Back to Devexpress

TdxGoogleAPIOAuth2AuthorizationAgent Class

vcl-dxauthorizationagents-dot-tdxgoogleapioauth2authorizationagent.md

latest7.2 KB
Original Source

TdxGoogleAPIOAuth2AuthorizationAgent Class

A non-visual component designed to authorize your application in a Google account.

Declaration

delphi
TdxGoogleAPIOAuth2AuthorizationAgent = class(
    TdxOAuth2AuthorizationAgent
)

Remarks

Associate this component with a Google API-compatible DevExpress data provider (for instance, TcxSchedulerWebServiceStorageGoogleProvider) to authenticate and authorize your app in a Google account.

Main API Members

The list below outlines key members of the TdxGoogleAPIOAuth2AuthorizationAgent component. These members allow you to authorize your app in a Google account on behalf of a user and manage access tokens.

Access Token Management

AccessToken | AccessTokenExpiresInReturn the current access token and its expiration time (in seconds).AccessTokenTypeReturns the access token type.DefaultTokenExpiresInSpecifies the default life time for an access token, in seconds.DefaultRedirectUri | RedirectUri | RedirectUriPort

Specify the address and port required to receive an access token.

Important

Use corresponding settings for different online service providers. Refer to the RedirectUri property description for detailed information.

Load

Assigns specified access and refresh tokens.

Tip

This method is useful if you need to load existing tokens stored in the local file system.

OnReceiveAccessToken | OnReceiveAuthorizationCodeAllow you to override predefined authorization and authentication routines.RefreshAccessTokenRefreshes the access token on demand using the refresh token.RefreshTokenReturns the current refresh token.RevokeAccessTokenRevokes the current access token. This operation also terminates the current authorization session.ValidateAccessTokenChecks if the access token is valid and refreshes the token if it has expired.

Credentials Management

ClientIDSpecifies a unique OAuth 2.0 client identifier.ClientSecret

Specifies the OAuth 2.0 secret for the identifier assigned to the ClientID property.

Important

We strongly recommend that you can handle the OnGetClientSecret event to request the client secret from a safe storage on demand.

OnGetClientSecret Recommended. Allows you to load an OAuth 2.0 secret from a safe storage in response to starting an authorization session.

Server-Related Settings

DefaultUserAgent | UserAgentAllow you to define a specific user agent for interaction with a cloud service.HeaderContentTypeSpecifies the default header for HTTPS requests.

Permission Management

AdditionalScopes

Specify a set of permissions granted by a user to an application for all required operations in the target account.

Important

Google Cloud services require explicitly defined access scopes for authorization. If an associated data provider component requires a permission missing in AdditionalScopes, an authorization error occurs.

DefaultIncludeGrantedScopesSpecifies if incremental authorization is active.RefreshScopesReloads account access permissions.

Session Management

FinishAuthorizationTerminates the ongoing authorization session.IsAuthorized | OnStartAuthorization | OnFinishAuthorizationAllow you to track the authorization session state.OnErrorReturns information on an authorization error every time it occurs.RestartAuthorizationRestarts the current authorization session.StartAuthorizationStarts a new authorization session using the current component settings.

Inheritance

TObject TPersistent TComponent TdxCustomAuthorizationAgent TdxOAuth2AuthorizationAgent TdxGoogleAPIOAuth2AuthorizationAgent

See Also

TdxMicrosoftGraphAPIOAuth2AuthorizationAgent Class

TdxGoogleAPIOAuth2AuthorizationAgent Members

dxAuthorizationAgents Unit