Back to Devexpress

TdxGoogleAPIOAuth2AuthorizationAgent.RedirectUriPort Property

vcl-dxauthorizationagents-dot-tdxgoogleapioauth2authorizationagent-1e7a1e4f.md

latest1.9 KB
Original Source

TdxGoogleAPIOAuth2AuthorizationAgent.RedirectUriPort Property

Specifies the port for a local HTTP server that authenticates and authorizes a Google data provider.

Declaration

delphi
property RedirectUriPort: Word read; write; default 0;

Property Value

TypeDefaultDescription
Word0

A local HTTP server port.

|

Remarks

The Google Authorization Agent component automatically generates a random port number for authentication and authorization via the loopback IP address. If the generated port number is already used by another application or service, the component throws the EIdSockedError exception when a user attempts to authorize in a Google account.

Use the RedirectUriPort property to manually specify a free port if the randomly generated port number is already in use on the client machine. Alternatively, you can append a colon followed by a port number to the RedirectUri property value:

delphi
dxGoogleAPIOAuth2AuthorizationAgent1.RedirectUri := 'http://localhost:32001';
cpp
dxGoogleAPIOAuth2AuthorizationAgent1->RedirectUri = "http://localhost:32001";

Note

The Google Authorization Agent component generates a random port number if the RedirectUriPort property is set to 0. The RedirectUriPort property’s setter updates the RedirectUri property value with a new port number.

The RedirectUriPort property’s default value is 0.

See Also

TdxGoogleAPIOAuth2AuthorizationAgent Class

TdxGoogleAPIOAuth2AuthorizationAgent Members

dxAuthorizationAgents Unit