IUserClaimStore<TUser> Interface¶
Syntax¶
public interface IUserClaimStore<TUser> : IUserStore<TUser>, IDisposable where TUser : class
Methods¶
-
AddClaimsAsync
(TUser, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>, System.Threading.CancellationToken)¶ Add claims to a user as an asynchronous operation.
Arguments: - user ({TUser}) – The user to add the claim to.
- claims (System.Collections.Generic.IEnumerable{System.Security.Claims.Claim}) – The collection of :dn:ref:`System.Security.Claims.Claim`s 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 AddClaimsAsync(TUser user, IEnumerable<Claim> claims, CancellationToken cancellationToken)
-
GetClaimsAsync
(TUser, System.Threading.CancellationToken)¶ Gets a list of System.Security.Claims.Claim`s to be belonging to the specified ``user` as an asynchronous operation.
Arguments: - user ({TUser}) – 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 <see cref=”T:System.Threading.Tasks.Task`1” /> that represents the result of the asynchronous query, a list of <see cref=”T:System.Security.Claims.Claim” />s.
Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken)
-
GetUsersForClaimAsync
(System.Security.Claims.Claim, System.Threading.CancellationToken)¶ Returns a list of users who contain the specified System.Security.Claims.Claim.
Arguments: - claim (System.Security.Claims.Claim) – The claim to look for.
- 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{{TUser}}}
Returns: A <see cref=”T:System.Threading.Tasks.Task`1” /> that represents the result of the asynchronous query, a list of <typeparamref name=”TUser” /> who contain the specified claim.
Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken)
-
RemoveClaimsAsync
(TUser, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>, System.Threading.CancellationToken)¶ Removes the specified
claims
from the givenuser
.Arguments: - user ({TUser}) – The user to remove the specified
claims
from. - claims (System.Collections.Generic.IEnumerable{System.Security.Claims.Claim}) – A collection of :dn:ref:`System.Security.Claims.Claim`s 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 RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims, CancellationToken cancellationToken)
- user ({TUser}) – The user to remove the specified
-
ReplaceClaimAsync
(TUser, System.Security.Claims.Claim, System.Security.Claims.Claim, System.Threading.CancellationToken)¶ Replaces the given
claim
on the specifieduser
with thenewClaim
Arguments: - user ({TUser}) – The user to replace the claim on.
- claim (System.Security.Claims.Claim) – The claim to replace.
- newClaim (System.Security.Claims.Claim) – The new claim to replace the existing
claim
with. - 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 ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim, CancellationToken cancellationToken)
-