共用方式為


IdentityBuilderExtensions.AddApiEndpoints(IdentityBuilder) 方法

定義

新增支援 MapIdentityApi<TUser>(IEndpointRouteBuilder) 所需的組態和服務,但不會設定驗證。 分別呼叫 AddBearerToken(AuthenticationBuilder, Action<BearerTokenOptions>) 和/或 AddIdentityCookies(AuthenticationBuilder) 以設定驗證。

public static Microsoft.AspNetCore.Identity.IdentityBuilder AddApiEndpoints (this Microsoft.AspNetCore.Identity.IdentityBuilder builder);
static member AddApiEndpoints : Microsoft.AspNetCore.Identity.IdentityBuilder -> Microsoft.AspNetCore.Identity.IdentityBuilder
<Extension()>
Public Function AddApiEndpoints (builder As IdentityBuilder) As IdentityBuilder

參數

傳回

IdentityBuilder

適用於