IUserClaimStore<TUser>.ReplaceClaimAsync 方法

定义

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

public:
 System::Threading::Tasks::Task ^ ReplaceClaimAsync(TUser user, System::Security::Claims::Claim ^ claim, System::Security::Claims::Claim ^ newClaim, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task ReplaceClaimAsync (TUser user, System.Security.Claims.Claim claim, System.Security.Claims.Claim newClaim, System.Threading.CancellationToken cancellationToken);
abstract member ReplaceClaimAsync : 'User * System.Security.Claims.Claim * System.Security.Claims.Claim * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ReplaceClaimAsync (user As TUser, claim As Claim, newClaim As Claim, cancellationToken As CancellationToken) As Task

参数

user
TUser

要替换声明的用户。

claim
Claim

要替换的声明。

newClaim
Claim

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

cancellationToken
CancellationToken

CancellationToken,用于传播应取消操作的通知。

返回

表示异步操作的任务对象。

适用于