Class UserBlocksClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /user-blocks endpoints.
public class UserBlocksClient : BaseClient, IUserBlocksClient
- Inheritance
-
UserBlocksClient
- Implements
- Inherited Members
Constructors
UserBlocksClient(IManagementConnection, Uri, IDictionary<string, string>)
Initializes a new instance of UserBlocksClient.
public UserBlocksClient(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
GetByIdentifierAsync(string, CancellationToken)
Get a user's blocks by identifier.
public Task<UserBlocks> GetByIdentifierAsync(string identifier, CancellationToken cancellationToken = default)
Parameters
identifier
stringThe identifier of the user. Can be a user's email address, username or phone number.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<UserBlocks>
The UserBlocks relating to the user requested.
GetByUserIdAsync(string, CancellationToken)
Get a user's blocks by user id.
public Task<UserBlocks> GetByUserIdAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the user.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<UserBlocks>
The UserBlocks relating to the user requested.
UnblockByIdentifierAsync(string, CancellationToken)
Unblock a user by their identifier.
public Task UnblockByIdentifierAsync(string identifier, CancellationToken cancellationToken = default)
Parameters
identifier
stringThe identifier of the user to unblock. Can be a user's email address, username or phone number.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
UnblockByUserIdAsync(string, CancellationToken)
Unblock a user by their id.
public Task UnblockByUserIdAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id of the user to unblock.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.