UserManager<TUser>.ReplaceClaimAsync(TUser, Claim, Claim) UserManager<TUser>.ReplaceClaimAsync(TUser, Claim, Claim) Method

Definition

Replaces the given claim on the specified user with the 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>

Parameters

user
TUser TUser

The user to replace the claim on.

claim
Claim Claim

The claim to replace.

newClaim
Claim Claim

The new claim to replace the existing claim with.

Returns

The Task that represents the asynchronous operation, containing the IdentityResult of the operation.

Applies to