|Manuals

TVirtualUI.AuthenticateOAuth Method

Description

Registers an OAuth 2.0 authentication method against an external identity provider — such as Google or Microsoft — and returns the URL of the provider’s login page.

Open the returned URL in the end user’s browser — for example, with the OpenLinkDlg method — to start the flow. When the user completes the login, VirtualUI exchanges the authorization code for an access token, retrieves the user’s profile, and fires the OnAuthentication event with the result.

Info

Available since Thinfinity VirtualUI 3.6.2.

Syntax

function AuthenticateOAuth(const ClientId: WideString; const ClientSecret: WideString;
  const AuthorizationUrl: WideString; const AuthorizationParams: WideString;
  const TokenValidationUrl: WideString; const TokenValidationParams: WideString;
  const ProfileInformationUrl: WideString;
  const ProfileInformationParams: WideString): WideString; safecall;

Parameters

Parameter Type Description
ClientId WideString The client ID of your application, as registered with the provider
ClientSecret WideString The client secret of your application
AuthorizationUrl WideString The provider’s authorization endpoint
AuthorizationParams WideString Additional parameters for the authorization request, such as scopes
TokenValidationUrl WideString The provider’s token endpoint, where the authorization code is exchanged for an access token
TokenValidationParams WideString Additional parameters for the token request
ProfileInformationUrl WideString The provider’s user-info endpoint
ProfileInformationParams WideString Additional parameters for the user-info request

Return Value

Type Description
WideString The URL of the provider’s login page, to be opened in the end user’s browser

See Also