|Manuals

VirtualUI.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

public string AuthenticateOAuth(string ClientId, string ClientSecret,
    string AuthorizationUrl, string AuthorizationParams,
    string TokenValidationUrl, string TokenValidationParams,
    string ProfileInformationUrl, string ProfileInformationParams);

Parameters

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

Return Value

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

See Also