The event handler receives an argument of type PgSqlAuthenticationPromptEventArgs containing data related to this event. The following PgSqlAuthenticationPromptEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Instruction | Gets the authentication instruction and additional information about authentication. |
Name | Gets the name of the authentication method. |
Prompts | Gets an array of prompts for the fields, that should be filled in the Responses array. |
Responses | Gets the array of strings, which should be filled in the PgSqlConnection.AuthenticationPrompt event handler according to the Prompts array. Each Responds string corresponds to the Prompts string. |
Clients that want to process authentication requests sent by the server should create a PgSqlAuthenticationPromptHandler delegate to listen to this event. This event may be called several times during authentication process to request corresponding user information. The server sends a request concerning information that should be obtained from the user. The amount of requested information can be learned by defining the length of the Prompts array. Developer should provide an interface for the user to enter requested information. The received information should be written to the Responses array.
This sample shows how performing keyboard-interactive authentication.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2