VirtualUI.OnAuthentication Event
Description
The OnAuthentication event fires when an authentication result is received from the server — that is, when an OAuth 2.0 flow started with the AuthenticateOAuth method completes.
Subscribers can handle this event by providing an event handler that accepts AuthenticationArgs parameters.
Info
Available since Thinfinity VirtualUI 3.6.2.
Syntax
public event EventHandler<AuthenticationArgs> OnAuthentication;
The AuthenticationArgs class exposes the following properties:
| Property | Type | Description |
|---|---|---|
AuthMethod |
string | The authentication method that completed. For the OAuth 2.0 flow, oauth |
Succeeded |
bool | Whether the authentication succeeded |
Data |
string | A JSON document with the result |
On success, Data contains the clientId, the accessToken, and a userInfo object with the profile returned by the provider. On failure, it contains the clientId and an errorMsg field instead.