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
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
CreateAsync(ClientGrantCreateRequest, CancellationToken)
Creates a new client grant.
public Task<ClientGrant> CreateAsync(ClientGrantCreateRequest request, CancellationToken cancellationToken = default)
Parameters
request
ClientGrantCreateRequestThe ClientGrantCreateRequest containing the properties of the Client Grant.
cancellationToken
CancellationTokenThe 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
stringThe identifier of the Client Grant to delete.
cancellationToken
CancellationTokenThe 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
request
GetClientGrantsRequestSpecifies criteria to use when querying client grants.
pagination
PaginationInfoSpecifies PaginationInfo to use in requesting paged results.
cancellationToken
CancellationTokenThe 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
stringThe identifier of the client grant.
pagination
CheckpointPaginationInfoSpecifies CheckpointPaginationInfo to use in requesting checkpoint-paginated results.
cancellationToken
CancellationTokenThe 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
stringThe identifier of the client grant.
pagination
PaginationInfoSpecifies PaginationInfo to use in requesting paged results.
cancellationToken
CancellationTokenThe 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
stringThe identifier of the client grant.
cancellationToken
CancellationTokenThe 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
stringThe identifier of the client grant to update.
request
ClientGrantUpdateRequestThe ClientGrantUpdateRequest containing the properties to update.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<ClientGrant>
The ClientGrant that has been updated.