ClientGrants
extends ManagementEndpoint
in package
implements
ClientGrantsInterface
Class ClientGrants.
Handles requests to the Client Grants endpoint of the v2 Management API.
Tags
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
$httpClient
private
HttpClient
$httpClient
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 —getHttpClient()
Get the injected HttpClient instance.
public
final getHttpClient() : HttpClient
Return values
HttpClient —getLastRequest()
Return an instance of HttpRequest representing the last issued request.
public
final getLastRequest() : HttpRequest|null
Return values
HttpRequest|null —getResponsePaginator()
Return a ResponsePaginator instance configured for the last HttpRequest.
public
final getResponsePaginator() : HttpResponsePaginator
Return values
HttpResponsePaginator —instance()
public
static instance(HttpClient $httpClient) : static
Parameters
- $httpClient : HttpClient
Return values
static —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.)