Auth0-PHP

ClientGrants extends ManagementEndpoint
in package
implements ClientGrantsInterface

Class ClientGrants.

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

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

Interfaces, Classes, Traits and Enums

ClientGrantsInterface
Interface ClientGrantsInterface.

Table of Contents

$httpClient  : HttpClient
__construct()  : mixed
ManagementEndpoint constructor.
create()  : ResponseInterface
Create a new Client Grant.
delete()  : ResponseInterface
Delete a Client Grant by ID.
getAll()  : ResponseInterface
Retrieve client grants, by page if desired.
getAllByAudience()  : ResponseInterface
Get Client Grants by audience.
getAllByClientId()  : ResponseInterface
Get Client Grants by Client ID.
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
update()  : ResponseInterface
Update an existing Client Grant.

Properties

Methods

__construct()

ManagementEndpoint constructor.

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

httpClient instance to use

Return values
mixed

create()

Create a new Client Grant.

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

Required scope: create:client_grants.

Parameters
$clientId : string

client ID to receive the grant

$audience : string

audience identifier for the API being granted

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

Optional. Scopes allowed for this client grant.

$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

delete()

Delete a Client Grant by ID.

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

Required scope: delete:client_grants.

Parameters
$grantId : string

grant (by it's ID) to delete

$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 client grants, by page if desired.

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

Required scope: read:client_grants.

Parameters
$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

getAllByAudience()

Get Client Grants by audience.

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

Required scope: read:client_grants.

Parameters
$audience : string

API Audience to filter by

$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 Client Grants by Client ID.

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

Required scope: read:client_grants.

Parameters
$clientId : string

client ID to filter by

$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

update()

Update an existing Client Grant.

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

Required scope: update:client_grants.

Parameters
$grantId : string

grant (by it's ID) to update

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

Optional. Array of scopes to update; will replace existing scopes, not merge.

$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