MiddleTierClientBuilder<TDbContext>.UseTokenAuthentication(String, Func<Task<String>>) Method
Configures the client to use a custom authentication based on the specified authentication scheme name and a JSON web token (JWT) identified through an async delegate.
Namespace: DevExpress.ExpressApp.ApplicationBuilder
Assembly: DevExpress.EntityFrameworkCore.Security.v25.2.dll
NuGet Package: DevExpress.ExpressApp.EFCore
Declaration
public MiddleTierClientBuilder<TDbContext> UseTokenAuthentication(
string schemeName,
Func<Task<string>> accessTokenProviderAsync
)
Parameters
| Name | Type | Description |
|---|---|---|
| schemeName | String | The name of the authentication scheme. |
| accessTokenProviderAsync | Func<Task<String>> | An async delegate that should return JSON web token (JWT). |
Returns
| Type | Description |
|---|---|
| MiddleTierClientBuilder<TDbContext> | The builder that allows you to further configure the Middle Tier Security client. |
Remarks
You can use this method for OAuth, Microsoft Entra ID (Azure AD), and other types of authentication.
See Also