Class GrantsClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public class GrantsClient : BaseClient, IGrantsClient
- Inheritance
-
GrantsClient
- Implements
- Inherited Members
Constructors
GrantsClient(IManagementConnection, Uri, IDictionary<string, string>)
public GrantsClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connection
IManagementConnectionbaseUri
UridefaultHeaders
IDictionary<string, string>
Methods
DeleteAllAsync(string, CancellationToken)
Deletes all Grants of a given user.
public Task DeleteAllAsync(string userId, CancellationToken cancellationToken = default)
Parameters
userId
stringcancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
A token with scope delete:grants is needed.
DeleteAsync(string, CancellationToken)
Delete an existing Grant
public Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the grant to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
Remarks
A token with scope delete:grants is needed.
GetAllAsync(GetGrantsRequest, PaginationInfo, CancellationToken)
Retrieve all Grants.
public Task<IPagedList<Grant>> GetAllAsync(GetGrantsRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
request
GetGrantsRequestSpecifies criteria to use when querying grants.
pagination
PaginationInfoSpecifies pagination info to use.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Grant>>
An IPagedList<T> containing the grants.
Remarks
A token with scope read:grants is needed