Skip to content

Сustomize standard authentication behavior and supply additional logon parameters in XAF applications

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/xaf-custom-logon-parameters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XAF - Customize Logon Parameters

This example customizes standard authentication behavior and supplies additional logon parameters in an XAF application. The default login form displays User Name and Password editors. This sample replaces User Name with Company and Application User lookup editors.

Login form

Note:

  • When first running a Blazor application, it does not create a database or populate lookup editors. To create a database, either log in with an empty username or start the Middle Tier server.
  • If using Middle Tier security, start the Middle Tier server before launching the Blazor or Win Forms client.

Implementation Details

  1. Define a Company class that contains company names. This class should contain a list of ApplicationUser objects as a part of a one-to-many relationship. Add the second part of this relationship to the ApplicationUser class generated by the Template Kit. Then, add the Company class to your application's DbContext.

  2. Create a custom logon parameter class that uses the Company class (CustomLogonParameters.cs).

  3. To access lists of companies and application users in login form (before authentication), implement data transfer objects (DTO) (CompanyDTO.cs / ApplicationUserDTO.cs).

  4. Register the CustomLogonParameters type as a known logon parameter type (Program.cs (Blazor) / Program.cs (WinForms)).

  5. A lookup editor displays the Edit button. Create a controller and call the CustomizeViewItemControl method to hide the button from the Company and Application User lookup editors (CustomLogonParameterLookupActionVisibilityController.cs).

For detailed instructions, refer to the following topic: Customize Standard Authentication Behavior and Supply Additional Logon Parameters.

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Сustomize standard authentication behavior and supply additional logon parameters in XAF applications

Topics

Resources

License

Stars

Watchers

Forks

Contributors 8

Languages