IRoleClaimStore<TRole> Interface¶
Provides an abstraction for a store of role specific claims.
- Namespace
Microsoft.AspNetCore.Identity
- Assemblies
- Microsoft.AspNetCore.Identity
Syntax¶
public interface IRoleClaimStore<TRole> : IRoleStore<TRole>, IDisposable where TRole : class
-
interface
Microsoft.AspNetCore.Identity.
IRoleClaimStore<TRole>
¶
Methods¶
-
AddClaimAsync
(TRole, System.Security.Claims.Claim, System.Threading.CancellationToken)¶ Add a new claim to a role as an asynchronous operation.
Arguments: - role (TRole) – The role to add a claim to.
- claim (System.Security.Claims.Claim) – The
System.Security.Claims.Claim
to add. - cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Returns: The task object representing the asynchronous operation.
Task AddClaimAsync(TRole role, Claim claim, CancellationToken cancellationToken = null)
-
GetClaimsAsync
(TRole, System.Threading.CancellationToken)¶ - Gets a list of
System.Security.Claims.Claim
s to be belonging to the specified <em>role</em> as an asynchronous operation.Arguments: - role (TRole) – The role whose claims to retrieve.
- cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task<System.Collections.Generic.IList<System.Security.Claims.Claim>>
Returns: A
System.Threading.Tasks.Task`1
that represents the result of the asynchronous query, a list ofSystem.Security.Claims.Claim
s.Task<IList<Claim>> GetClaimsAsync(TRole role, CancellationToken cancellationToken = null)
-
RemoveClaimAsync
(TRole, System.Security.Claims.Claim, System.Threading.CancellationToken)¶ Remove a claim from a role as an asynchronous operation.
Arguments: - role (TRole) – The role to remove the claim from.
- claim (System.Security.Claims.Claim) – The
System.Security.Claims.Claim
to remove. - cancellationToken (System.Threading.CancellationToken) – The
System.Threading.CancellationToken
used to propagate notifications that the operation should be canceled.
Return type: System.Threading.Tasks.Task
Returns: The task object representing the asynchronous operation.
Task RemoveClaimAsync(TRole role, Claim claim, CancellationToken cancellationToken = null)
-