Skip to main content
.NET 6.0+

AuthenticationStandard Class

Authentication with an interactive logon. A user inputs logon parameters (for example, username and password) in the logon dialog window.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v24.1.dll

Declaration

[ToolboxTabName("DX.24.1: XAF Security")]
public class AuthenticationStandard :
    AuthenticationBase,
    IAuthenticationStandard,
    ISupportChangePasswordOption

Remarks

If the application uses Standard Authentication, the logon window displays a Detail View of an AuthenticationStandardLogonParameters object. This object has two string properties: UserName and Password. The UserName property is used to find the corresponding user in the database. You cannot log into the application if the user is not found or the specified password is wrong.

Standard Authentication (the AuthenticationStandard object) works only with AuthenticationStandardLogonParameters objects, including descendants.

Logon Window in an ASP.NET Core Blazor Application
Logon Window in an ASP.NET Core Blazor Application
Logon Window in a Windows Forms Application
Logon Window in a WinForms Application
Logon Window in an ASP.NET Web Forms Application
Logon Window in an ASP.NET Web Forms Application

Select Standard Authentication in the Solution Wizard

When you use the Solution Wizard to create a new application, select Standard as the Authentication method.

Solution Wizard

Enable Standard Authentication in an Existing Application

.NET

To enable Standard Authentication in an existing application without a security system, follow the steps described in the following help topic: Use the Security System. Alternatively, create two applications - one with Standard Authentication and one without - and compare them side-by-side to see what changes you need to make to implement Standard Authentication in your application.

.NET Framework

You can enable Standard Authentication in code. Instantiate the AuthenticationStandard class and pass this instance to the SecurityStrategyComplex constructor. Assign the created security strategy object to the XafApplication.Security property.

Windows Forms

Navigate to YourSolutionName.Win folder and modify the Program.cs (Program.vb) file in the following manner:

public static void Main(string[] arguments) {
    YourSolutionWinApplication winApplication = new YourSolutionWinApplication();
    winApplication.Security = 
        new SecurityStrategyComplex(typeof(PermissionPolicyUser), typeof(PermissionPolicyRole), 
            new AuthenticationStandard());
    // ...
}

ASP.NET Web Forms

Navigate to YourSolutionName.Web folder and modify the Global.asax.cs (Global.asax.vb) file:

protected void Session_Start(Object sender, EventArgs e) {
    WebApplication.SetInstance(Session, new YourSolutionAspNetApplication());
    WebApplication.Instance.Security = 
        new SecurityStrategyComplex(typeof(PermissionPolicyUser), typeof(PermissionPolicyRole), 
            new SecurityDemoAuthentication());
    // ...
}

Alternatively, in .NET Framework applications, you can enable Standard Authentication in the Application Designer. To do this, invoke the designer and drag the AuthenticationStandard component from the Toolbox (DX.24.1: XAF Security page) to the designer’s Security pane.

Security_DesignerAuthenticationSimple

If your application uses server-side security, refer to the Middle Tier Security topic for instructions on how to enable Standard Authentication.

See Also