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
connectionIManagementConnectionIManagementConnection used to make all API calls.
baseUriUriUri of the endpoint to use in making API calls.
defaultHeadersIDictionary<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
requestClientGrantCreateRequestThe ClientGrantCreateRequest containing the properties of the Client Grant.
cancellationTokenCancellationTokenThe 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
idstringThe identifier of the Client Grant to delete.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
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
requestGetClientGrantsRequestSpecifies criteria to use when querying client grants.
paginationPaginationInfoSpecifies PaginationInfo to use in requesting paged results.
cancellationTokenCancellationTokenThe 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
idstringThe identifier of the client grant.
paginationCheckpointPaginationInfoSpecifies CheckpointPaginationInfo to use in requesting checkpoint-paginated results.
cancellationTokenCancellationTokenThe 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
idstringThe identifier of the client grant.
paginationPaginationInfoSpecifies PaginationInfo to use in requesting paged results.
cancellationTokenCancellationTokenThe 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
idstringThe identifier of the client grant.
cancellationTokenCancellationTokenThe 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
idstringThe identifier of the client grant to update.
requestClientGrantUpdateRequestThe ClientGrantUpdateRequest containing the properties to update.
cancellationTokenCancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ClientGrant>
The ClientGrant that has been updated.