UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.ReplaceClaimAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将 claim
指定 user
上的 替换为 newClaim
。
public virtual System.Threading.Tasks.Task ReplaceClaimAsync (TUser user, System.Security.Claims.Claim claim, System.Security.Claims.Claim newClaim, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task ReplaceClaimAsync (TUser user, System.Security.Claims.Claim claim, System.Security.Claims.Claim newClaim, System.Threading.CancellationToken cancellationToken = default);
abstract member ReplaceClaimAsync : 'User * System.Security.Claims.Claim * System.Security.Claims.Claim * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ReplaceClaimAsync : 'User * System.Security.Claims.Claim * System.Security.Claims.Claim * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ReplaceClaimAsync : 'User * System.Security.Claims.Claim * System.Security.Claims.Claim * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function ReplaceClaimAsync (user As TUser, claim As Claim, newClaim As Claim, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overrides Function ReplaceClaimAsync (user As TUser, claim As Claim, newClaim As Claim, Optional cancellationToken As CancellationToken = Nothing) As Task
参数
- user
- TUser
要替换声明的用户。
- claim
- Claim
声明将替换。
- newClaim
- Claim
替换 claim
的新声明。
- cancellationToken
- CancellationToken
CancellationToken,用于传播应取消操作的通知。
返回
表示异步操作的 Task。