TVirtualUI.OnAuthentication Event
Description
This 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.
Info
Available since Thinfinity VirtualUI 3.6.2.
Syntax
property OnAuthentication: TAuthenticationEvent;
The event handler receives the following arguments:
TAuthenticationEvent = procedure(Sender: TObject; const AuthMethod: string;
Success: Boolean; const Data: string) of object;
Parameters
| Parameter | Type | Description |
|---|---|---|
Sender |
TObject | The object that fired the event |
AuthMethod |
string | The authentication method that completed. For the OAuth 2.0 flow, oauth |
Success |
Boolean | 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.
Details
- Event Type: TAuthenticationEvent
- Trigger Condition: Fires when an authentication flow started with
AuthenticateOAuthcompletes