You are here

public function ResourceServers::update in Auth0 Single Sign On 8.2

Update a Resource Server by ID. Required scope: "update:resource_servers"

@link https://auth0.com/docs/api/management/v2#!/Resource_Servers/patch_resour...

Parameters

string $id Resource Server ID or identifier to update.:

array $data Data to update.:

Return value

mixed

Throws

CoreException Thrown if the id parameter is empty or is not a string.

\Exception Thrown by the HTTP client when there is a problem with the API call.

File

vendor/auth0/auth0-php/src/API/Management/ResourceServers.php, line 140

Class

ResourceServers
Class ResourceServers. Handles requests to the Resource Servers endpoint of the v2 Management API.

Namespace

Auth0\SDK\API\Management

Code

public function update($id, array $data) {
  if (empty($id) || !is_string($id)) {
    throw new CoreException('Invalid "id" parameter.');
  }
  return $this->apiClient
    ->method('patch')
    ->addPath('resource-servers', $id)
    ->withBody(json_encode($data))
    ->call();
}