Skip to main content
All docs
V25.1
  • .NET 8.0+
    • The page you are viewing does not exist in the .NET Framework 4.6.2+ platform documentation. This link will take you to the parent topic of the current section.

    MiddleTierClientBuilder<TDbContext>.UsePasswordAuthentication(String, String) Method

    Configures the client to use authentication with the specified login and password.

    Namespace: DevExpress.ExpressApp.ApplicationBuilder

    Assembly: DevExpress.EntityFrameworkCore.Security.v25.1.dll

    NuGet Package: DevExpress.ExpressApp.EFCore

    Declaration

    public MiddleTierClientBuilder<TDbContext> UsePasswordAuthentication(
        string userName,
        string password
    )

    Parameters

    Name Type Description
    userName String

    The client user name (login).

    password String

    The client password.

    Returns

    Type Description
    MiddleTierClientBuilder<TDbContext>

    The builder that allows you to further configure the Middle Tier client.

    Remarks

    The following code sample creates a new client, connects it to the remote Middle Tier server at http://localhost:5000/, and uses authentication with the specified login and password.

    var builder = new MiddleTierClientBuilder<MainDemoDbContext>()
        .UseServer("http://localhost:5000/")
        .UsePasswordAuthentication("user", "password");
    
    IMiddleTierClient<MainDemoDbContext> client = builder.Build();
    
    See Also