TdxOAuth2AuthorizationAgent.OnGetClientSecret Event
Occurs on an attempt to authorize in an online account via the OAuth 2.0 authentication protocol.
Declaration
property OnGetClientSecret: TGetClientSecretEvent read; write;
Remarks
This event occurs immediately prior to an HTTP request to an OAuth 2.0 authentication server and provides you with a safer alternative to storing the client secret in source code. Handle the OnGetClientSecret event to use the OAuth 2.0 client secret obtained from an external source in the authentication process instead of the ClientSecret property value. Refer to the TGetClientSecretEvent nested procedural type description for detailed information on parameters that you can use in the OnGetClientSecret event handler.
Note
The authorization agent component attempts to use the ClientSecret property value as the OAuth 2.0 client secret if the OnGetClientSecret event is not handled.