Auth0-PHP

Grants extends ManagementEndpoint
in package
implements GrantsInterface

Class Grants.

Handles requests to the Grants endpoint of the v2 Management API.

Tags
see
https://auth0.com/docs/api/management/v2#!/Grants

Interfaces, Classes, Traits and Enums

GrantsInterface
Interface GrantsInterface.

Table of Contents

$httpClient  : HttpClient
__construct()  : mixed
ManagementEndpoint constructor.
delete()  : ResponseInterface
Delete a grant by Grant ID or User ID.
getAll()  : ResponseInterface
Retrieve the grants associated with your account.
getAllByAudience()  : ResponseInterface
Get Grants by Audience with pagination.
getAllByClientId()  : ResponseInterface
Get Grants by Client ID with pagination.
getAllByUserId()  : ResponseInterface
Get Grants by User ID with pagination.
getHttpClient()  : HttpClient
Get the injected HttpClient instance.
getLastRequest()  : HttpRequest|null
Return an instance of HttpRequest representing the last issued request.
getResponsePaginator()  : HttpResponsePaginator
Return a ResponsePaginator instance configured for the last HttpRequest.
instance()  : static

Properties

Methods

__construct()

ManagementEndpoint constructor.

public final __construct(HttpClient $httpClient) : mixed
Parameters
$httpClient : HttpClient

httpClient instance to use

Return values
mixed

delete()

Delete a grant by Grant ID or User ID.

public delete(string $id[, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: delete:grants.

Parameters
$id : string

grant ID to delete a single Grant or User ID to delete all Grants for a User

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getAll()

Retrieve the grants associated with your account.

public getAll([array<string|int, mixed>|null $parameters = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:grants.

Parameters
$parameters : array<string|int, mixed>|null = null

Optional. Query parameters to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getAllByAudience()

Get Grants by Audience with pagination.

public getAllByAudience(string $audience[, array<string|int, mixed>|null $parameters = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:grants.

Parameters
$audience : string

audience to filter Grants

$parameters : array<string|int, mixed>|null = null

Optional. Additional query parameters to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getAllByClientId()

Get Grants by Client ID with pagination.

public getAllByClientId(string $clientId[, array<string|int, mixed>|null $parameters = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:grants.

Parameters
$clientId : string

client ID to filter Grants

$parameters : array<string|int, mixed>|null = null

Optional. Additional query parameters to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

getAllByUserId()

Get Grants by User ID with pagination.

public getAllByUserId(string $userId[, array<string|int, mixed>|null $parameters = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:grants.

Parameters
$userId : string

user ID to filter Grants

$parameters : array<string|int, mixed>|null = null

Optional. Additional query parameters to pass with the API request. See @see for supported options.

$options : RequestOptions|null = null

Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)

Return values
ResponseInterface

Search results