Table of Contents

Class ClientGrantsClient

Namespace
Auth0.ManagementApi.Clients
Assembly
Auth0.ManagementApi.dll

Contains methods to access the /client-grants endpoints.

public class ClientGrantsClient : BaseClient, IClientGrantsClient
Inheritance
ClientGrantsClient
Implements
Inherited Members

Constructors

ClientGrantsClient(IManagementConnection, Uri, IDictionary<string, string>)

Initializes a new instance of ClientGrantsClient.

public ClientGrantsClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)

Parameters

connection IManagementConnection

IManagementConnection used to make all API calls.

baseUri Uri

Uri 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(ClientGrantCreateRequest, CancellationToken)

Creates a new client grant.

public Task<ClientGrant> CreateAsync(ClientGrantCreateRequest request, CancellationToken cancellationToken = default)

Parameters

request ClientGrantCreateRequest

The ClientGrantCreateRequest containing the properties of the Client Grant.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<ClientGrant>

The new ClientGrant that has been created.

DeleteAsync(string, CancellationToken)

Deletes a client grant.

public Task DeleteAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The identifier of the Client Grant to delete.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

GetAllAsync(GetClientGrantsRequest, PaginationInfo, CancellationToken)

Gets a list of all the client grants.

public Task<IPagedList<ClientGrant>> GetAllAsync(GetClientGrantsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)

Parameters

request GetClientGrantsRequest

Specifies criteria to use when querying client grants.

pagination PaginationInfo

Specifies PaginationInfo to use in requesting paged results.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<ClientGrant>>

A IPagedList<T> containing the client grants requested.

GetAllOrganizationsAsync(string, CheckpointPaginationInfo, CancellationToken)

Get the organizations associated to a client grant

public Task<IPagedList<Organization>> GetAllOrganizationsAsync(string id, CheckpointPaginationInfo pagination = null, CancellationToken cancellationToken = default)

Parameters

id string

The identifier of the client grant.

pagination CheckpointPaginationInfo

Specifies CheckpointPaginationInfo to use in requesting checkpoint-paginated results.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<Organization>>

A IPagedList<T> containing the organizations requested.

GetAllOrganizationsAsync(string, PaginationInfo, CancellationToken)

Get the organizations associated to a client grant

public Task<IPagedList<Organization>> GetAllOrganizationsAsync(string id, PaginationInfo pagination, CancellationToken cancellationToken = default)

Parameters

id string

The identifier of the client grant.

pagination PaginationInfo

Specifies PaginationInfo to use in requesting paged results.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<Organization>>

A IPagedList<T> containing the organizations requested.

GetAllOrganizationsAsync(string, CancellationToken)

Get the organizations associated to a client grant

public Task<IPagedList<Organization>> GetAllOrganizationsAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The identifier of the client grant.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<Organization>>

A IPagedList<T> containing the organizations requested.

UpdateAsync(string, ClientGrantUpdateRequest, CancellationToken)

Updates a client grant.

public Task<ClientGrant> UpdateAsync(string id, ClientGrantUpdateRequest request, CancellationToken cancellationToken = default)

Parameters

id string

The identifier of the client grant to update.

request ClientGrantUpdateRequest

The ClientGrantUpdateRequest containing the properties to update.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<ClientGrant>

The ClientGrant that has been updated.