RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TLoginFormAdapter.OnValidatePassword Event

Occurs when the login form adapter must validate the password that the user supplied.

Pascal
property OnValidatePassword: TValidateAdapterFieldEvent;
C++
__property TValidateAdapterFieldEvent OnValidatePassword;

Write an OnValidatePassword event handler to validate the password that the user supplies to the login form. This event is especially important if the WebSnap application does not include a TWebUserList component for checking passwords against user names. The supplied Password is the value of the Value parameter on the event handler. You can check this against the user's name by reading the UserName property. 

When the login form adapter's LogIn action executes, the adapter first receives an OnValidatePassword event to check the password. If the event handler sets the Handled parameter to true, indicating that the password is valid, the adapter goes on to validate the user name using an OnValidateUserName event, and then to log the user in using an OnLogin event (and, if the application includes an end user adapter, by calling the end user adapter's LogIn method). If the event handler finds the password to be invalid, it should raise an exception. If the event handler does not validate the supplied password (that is, if it sets the Handled parameter to false), the login form adapter validates the password by checking whether it is non-blank if the PasswordRequired property is true. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!