Class BlacklistedTokensClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /blacklists/tokens endpoints.
public class BlacklistedTokensClient : BaseClient, IBlacklistedTokensClient
- Inheritance
-
BlacklistedTokensClient
- Implements
- Inherited Members
Constructors
BlacklistedTokensClient(IManagementConnection, Uri, IDictionary<string, string>)
Initializes a new instance of BlacklistedTokensClient.
public BlacklistedTokensClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connection
IManagementConnectionIManagementConnection used to make all API calls.
baseUri
UriUri of the endpoint to use in making API calls.
defaultHeaders
IDictionary<string, string>Dictionary containing default headers included with every request this client makes.
Methods
CreateAsync(BlacklistedTokenCreateRequest, CancellationToken)
Blacklists a JWT token.
public Task CreateAsync(BlacklistedTokenCreateRequest request, CancellationToken cancellationToken = default)
Parameters
request
BlacklistedTokenCreateRequestThe BlacklistedTokenCreateRequest containing the information of the token to blacklist.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(string, CancellationToken)
Gets all the blacklisted claims.
public Task<IList<BlacklistedToken>> GetAllAsync(string aud, CancellationToken cancellationToken = default)
Parameters
aud
stringThe JWT's aud claim. The client_id of the client for which it was issued.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IList<BlacklistedToken>>
A list of BlacklistedToken objects.