User Authentication using a Logon Window in ASP.NET Web Forms Applications
- 10 minutes to read
This topic details the steps performed from the time the WebApplication object has been created and initialized, until the moment an end user has been authenticated to the application. In accordance with the Authentication Strategy that is used by the Security System in your application, an end user can be asked to type credentials in a logon window to be authenticated. There are two built-in Authentication Strategies in XAF. The AuthenticationStandard authenticates end users with the information typed in the logon window. The AuthenticationActiveDirectory does not require the logon window to be displayed. It takes the required information from the system’s active directory. This topic details how end users are authenticated when the built-in AuthenticationStandard strategy is used. To learn what steps are taken when the built-in AuthenticationActiveDirectory strategy is used, refer to the User Authentication Without a Logon Window in ASP.NET Web Forms Applications topic. You can customize the AuthenticationActiveDirectory, so that a logon window is displayed and the information typed in it is used for authentication. In this instance, read this topic to learn how the logon window is displayed.
#Create a Logon View
Stage Description | Ways to Interfere |
---|---|
A Detail View is created by the information stored in the Application Model‘s Views | <Logon | If you require that custom information is requested in the logon window, specify a custom Logon By default, an object of the specified Logon By default, the values specified by an authenticated user are saved to the Settings You can access the Logon You can customize the Detail View representing the Login |
The created View’s Detail |
|
#Create a Logon Window
Stage Description | Ways to Interfere |
---|---|
Before creating an instance of the Window class, required Controllers are created. | If you need to add custom buttons to the logon window, or customize the behavior of the default ones, implement a custom Dialog Controller by inheriting from the Web By default, only the Controllers that are sufficient for the logon window are created. You can create extra Controllers. To do this, handle the Xaf Subscribe to the Controller. |
Then, a Window is created and all the created Controllers are registered in it. This means that their Window | Subscribe to the Controller. |
The Controllers that represent the Window | To activate a Window Controller for the Logon Window only, add an item to the Controller. Override a Controller’s Window Subscribe to the Controller. |
#Assign the View to the Window
Stage Description | Ways to Interfere |
---|---|
The created View is assigned to the Logon Window. | Subscribe to the Frame. |
View Controllers from the Logon Window’s Frame. | You can manage the activation of a View Controller using the following properties: View Override a Controller’s View Subscribe to the Controller. |
#Assign the Logon Template to the Window
Stage Description | Ways to Interfere |
---|---|
The Login. |
You can customize the Logon. |
#Controls for Actions are Created
Stage Description | Ways to Interfere |
---|---|
The Window’s Template |
Subscribe to the Frame. |
#Assign the Window’s View to the Template
Stage Description | Ways to Interfere |
---|---|
The View is assigned to a current Window’s Template. This forces the creation of a View’s control (see View. |
Handle, the View. |
#Authentication
Stage Description | Ways to Interfere |
---|---|
To start the authentication process, an Object Space (see Base | Before the authenticating process is started, you can access the Log in You can perform a custom process of checking the database and application compatibility. For this purpose handle the Xaf If you do not need this scenario implemented in the Xaf Use the Xaf |
Authentication is accomplished after an end user clicks Log In in the logon window. When the Authentication | If the default authentication that is performed by a built-in Authentication class does not satisfy your requirements, implement a custom class. For instance, inherit from one of the built-in authentication classes: Authentication You can access the Logon |
The system gives end users three attempts to logon to the application. After the third attempt, the Logon Window’s View is changed to a newly created Login | To change the default three-attempt scenario, override the On You can customize the Login |
The end-user customizations layer is created. In XAF ASP. | You can store the customizations made to a List View in the web browser cookies by setting the IModel To access the Logon |