Table of Contents

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

request ClientCreateRequest

The ClientCreateRequest containing the properties of the new client.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Client>

The new Client that has been created.

CreateCredentialAsync(string, ClientCredentialCreateRequest, CancellationToken)

Creates a new client credential.

Task<Credential> CreateCredentialAsync(string clientId, ClientCredentialCreateRequest request, CancellationToken cancellationToken = default)

Parameters

clientId string

The id of the client for which you want to create the credential.

request ClientCredentialCreateRequest

The ClientCredentialCreateRequest containing the properties of the new client credential.

cancellationToken CancellationToken

The 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

id string

The id of the client to delete.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

DeleteCredentialAsync(string, string, CancellationToken)

Deletes a specific credential registered with the provided client.

Task DeleteCredentialAsync(string clientId, string credentialId, CancellationToken cancellationToken = default)

Parameters

clientId string

The id of the client for which you want to remove the credential.

credentialId string

The id of the credential to remove.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

GetAllAsync(GetClientsRequest, PaginationInfo, CancellationToken)

Retrieves a list of all client applications.

Task<IPagedList<Client>> GetAllAsync(GetClientsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)

Parameters

request GetClientsRequest

Specifies criteria to use when querying clients.

pagination PaginationInfo

Specifies pagination info to use when requesting paged results.

cancellationToken CancellationToken

The 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

clientId string

The id of the client for which you want to retrieve the credentials.

cancellationToken CancellationToken

The 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

id string

The id of the client to retrieve.

fields string

A comma separated list of fields to include or exclude (depending on includeFields) from the result, empty to retrieve all fields.

includeFields bool

true if the fields specified are to be included in the result, false otherwise (defaults to true)

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Client>

The Client retrieved.

GetCredentialAsync(string, string, CancellationToken)

Retrieves a specific credential for a client.

Task<Credential> GetCredentialAsync(string clientId, string credentialId, CancellationToken cancellationToken = default)

Parameters

clientId string

The id of the client for which you want to retrieve the credential.

credentialId string

The id of the credential to retrieve.

cancellationToken CancellationToken

The 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

id string

The id of the client which secret needs to be rotated.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Client>

The Client that has had its secret rotated.

UpdateAsync(string, ClientUpdateRequest, CancellationToken)

Updates a client application.

Task<Client> UpdateAsync(string id, ClientUpdateRequest request, CancellationToken cancellationToken = default)

Parameters

id string

The id of the client you want to update.

request ClientUpdateRequest

The ClientUpdateRequest containing the properties of the client you want to update.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Client>

The Client that was updated.

UpdateCredentialAsync(string, string, ClientCredentialUpdateRequest, CancellationToken)

Update a client credential.

Task<Credential> UpdateCredentialAsync(string clientId, string credentialId, ClientCredentialUpdateRequest request, CancellationToken cancellationToken = default)

Parameters

clientId string

The id of the client for which you want to update the credential.

credentialId string

The id of the credential to update.

request ClientCredentialUpdateRequest

The ClientCredentialUpdateRequest containing the properties of the new client credential.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Credential>

The new Credential that has been created.