UserManager<TUser>.AddClaimsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified claims
to the user
.
public:
virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ AddClaimsAsync(TUser user, System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ claims);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> AddClaimsAsync (TUser user, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims);
abstract member AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function AddClaimsAsync (user As TUser, claims As IEnumerable(Of Claim)) As Task(Of IdentityResult)
Parameters
- user
- TUser
The user to add the claim to.
- claims
- IEnumerable<Claim>
The claims to add.
Returns
The Task that represents the asynchronous operation, containing the IdentityResult of the operation.