Interface IClientsClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public interface IClientsClient
Methods
CreateAsync(ClientCreateRequest, CancellationToken)
Creates a new client application.
Task<Client> CreateAsync(ClientCreateRequest request, CancellationToken cancellationToken = default)
Parameters
requestClientCreateRequestThe ClientCreateRequest containing the properties of the new client.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
CreateCredentialAsync(string, ClientCredentialCreateRequest, CancellationToken)
Creates a new client credential.
Task<Credential> CreateCredentialAsync(string clientId, ClientCredentialCreateRequest request, CancellationToken cancellationToken = default)
Parameters
clientIdstringThe id of the client for which you want to create the credential.
requestClientCredentialCreateRequestThe ClientCredentialCreateRequest containing the properties of the new client credential.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Credential>
The new Credential that has been created.
DeleteAsync(string, CancellationToken)
Deletes a client and all its related assets (like rules, connections, etc) given its id.
Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
idstringThe id of the client to delete.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
DeleteCredentialAsync(string, string, CancellationToken)
Deletes a specific credential registered with the provided client.
Task DeleteCredentialAsync(string clientId, string credentialId, CancellationToken cancellationToken = default)
Parameters
clientIdstringThe id of the client for which you want to remove the credential.
credentialIdstringThe id of the credential to remove.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(GetClientsRequest, PaginationInfo, CancellationToken)
Retrieves a list of all client applications.
Task<IPagedList<Client>> GetAllAsync(GetClientsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
requestGetClientsRequestSpecifies criteria to use when querying clients.
paginationPaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Client>>
An IPagedList<T> containing the clients.
GetAllCredentialsAsync(string, CancellationToken)
Retrieves a list of all credentials for a client.
Task<IList<Credential>> GetAllCredentialsAsync(string clientId, CancellationToken cancellationToken = default)
Parameters
clientIdstringThe id of the client for which you want to retrieve the credentials.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IList<Credential>>
An IList<T> containing the client's credentials.
GetAsync(string, string, bool, CancellationToken)
Retrieves a client by its id.
Task<Client> GetAsync(string id, string fields = null, bool includeFields = true, CancellationToken cancellationToken = default)
Parameters
idstringThe id of the client to retrieve.
fieldsstringA comma separated list of fields to include or exclude (depending on includeFields) from the result, empty to retrieve all fields.
includeFieldsbooltrue if the fields specified are to be included in the result, false otherwise (defaults to true)
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
GetCredentialAsync(string, string, CancellationToken)
Retrieves a specific credential for a client.
Task<Credential> GetCredentialAsync(string clientId, string credentialId, CancellationToken cancellationToken = default)
Parameters
clientIdstringThe id of the client for which you want to retrieve the credential.
credentialIdstringThe id of the credential to retrieve.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Credential>
A Credential containing the client's credential.
RotateClientSecret(string, CancellationToken)
Rotate a client secret. The generated secret is NOT base64 encoded.
Task<Client> RotateClientSecret(string id, CancellationToken cancellationToken = default)
Parameters
idstringThe id of the client which secret needs to be rotated.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
UpdateAsync(string, ClientUpdateRequest, CancellationToken)
Updates a client application.
Task<Client> UpdateAsync(string id, ClientUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
idstringThe id of the client you want to update.
requestClientUpdateRequestThe ClientUpdateRequest containing the properties of the client you want to update.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
UpdateCredentialAsync(string, string, ClientCredentialUpdateRequest, CancellationToken)
Update a client credential.
Task<Credential> UpdateCredentialAsync(string clientId, string credentialId, ClientCredentialUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
clientIdstringThe id of the client for which you want to update the credential.
credentialIdstringThe id of the credential to update.
requestClientCredentialUpdateRequestThe ClientCredentialUpdateRequest containing the properties of the new client credential.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<Credential>
The new Credential that has been created.