IRoleClaimStore<TRole> Interface

Summary

Provides an abstraction for a store of role specific claims.

Syntax

public interface IRoleClaimStore<TRole> : IRoleStore<TRole>, IDisposable where TRole : class

GitHub

View on GitHub

interface Microsoft.AspNet.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 ``role` 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 <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(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)