You are here

public function DeviceCredentials::getAll in Auth0 Single Sign On 8.2

Parameters

string $user_id:

string $client_id:

string $type:

null|string|array $fields:

null|string|array $include_fields:

Return value

mixed

File

vendor/auth0/auth0-php/src/API/Management/DeviceCredentials.php, line 19

Class

DeviceCredentials

Namespace

Auth0\SDK\API\Management

Code

public function getAll($user_id = null, $client_id = null, $type = null, $fields = null, $include_fields = null) {
  $request = $this->apiClient
    ->method('get')
    ->addPath('device-credentials');
  if ($fields !== null) {
    if (is_array($fields)) {
      $fields = implode(',', $fields);
    }
    $request
      ->withParam('fields', $fields);
  }
  if ($include_fields !== null) {
    $request
      ->withParam('include_fields', $include_fields);
  }
  if ($user_id !== null) {
    $request
      ->withParam('user_id', $user_id);
  }
  if ($client_id !== null) {
    $request
      ->withParam('client_id', $client_id);
  }
  if ($type !== null) {
    $request
      ->withParam('type', $type);
  }
  return $request
    ->call();
}