共用方式為


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

定義

將指定的 上指定的 claimuser 取代為 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 作業的 。

適用於