UserManager<TUser>.ReplaceClaimAsync(TUser, Claim, Claim) 方法

定义

将指定 user 上给定claim的 替换为newClaim

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

参数

user
TUser

要替换声明的用户。

claim
Claim

要替换的声明。

newClaim
Claim

用于替换现有 claim 的新声明。

返回

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

适用于