|Manuals

IVirtualUI::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 method of the IEvents interface with the result.

Info

Available since Thinfinity VirtualUI 3.6.2.

Syntax

[id(0x000000D2)]
HRESULT _stdcall AuthenticateOAuth(
    [in] BSTR ClientId,
    [in] BSTR ClientSecret,
    [in] BSTR AuthorizationUrl,
    [in] BSTR AuthorizationParams,
    [in] BSTR TokenValidationUrl,
    [in] BSTR TokenValidationParams,
    [in] BSTR ProfileInformationUrl,
    [in] BSTR ProfileInformationParams,
    [out, retval] BSTR* OutRetLoginUrl
);

Parameters

Parameter Type Description
ClientId BSTR The client ID of your application, as registered with the provider
ClientSecret BSTR The client secret of your application
AuthorizationUrl BSTR The provider’s authorization endpoint
AuthorizationParams BSTR Additional parameters for the authorization request, such as scopes
TokenValidationUrl BSTR The provider’s token endpoint, where the authorization code is exchanged for an access token
TokenValidationParams BSTR Additional parameters for the token request
ProfileInformationUrl BSTR The provider’s user-info endpoint
ProfileInformationParams BSTR Additional parameters for the user-info request
OutRetLoginUrl BSTR* Returns the URL of the provider’s login page, to be opened in the end user’s browser

Return Value

Type Description
HRESULT Standard COM return value indicating success or failure.

See Also