UserManager<TUser>.AddClaimsAsync 方法

定义

将指定的 claims 添加到 user

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ AddClaimsAsync(TUser user, System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ claims);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> AddClaimsAsync (TUser user, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims);
abstract member AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function AddClaimsAsync (user As TUser, claims As IEnumerable(Of Claim)) As Task(Of IdentityResult)

参数

user
TUser

要向其添加声明的用户。

claims
IEnumerable<Claim>

要添加的声明。

返回

表示 Task 异步操作的 ,包含 IdentityResult 操作的 。

适用于