Skip to main content

TdxAuthorizationAgentUserInfo.GetUserInfo(TdxCustomAuthorizationAgent) Method

Creates a new user information provider for the specified authorization agent.

Declaration

class function GetUserInfo(AAuthorizationAgent: TdxCustomAuthorizationAgent): TdxAuthorizationAgentUserInfo; static;

Parameters

Name Type
AAuthorizationAgent TdxCustomAuthorizationAgent

Returns

Type
TdxAuthorizationAgentUserInfo

Remarks

Call this class function instead of the Create constructor to create a new user information provider (a TdxAuthorizationAgentUserInfo class descendant) that connects to an online account via the properly configured authorization agent component passed as the AAuthorizationAgent parameter. The GetUserInfo function ensures that the returned user information agent is compatible with the specified authorization agent (that is, the function creates a Google account user information provider if, for instance, a Google API authorization agent component is specified). If the AAuthorizationAgent agent has no corresponding user information provider type, the GetUserInfo function returns nil.

Note

A newly created provider contains no account user information. Call the UpdateInfo procedure to attempt to connect the provider to an online account and retrieve the user email and display name from it.

See Also