Auth0-PHP

DeviceCredentials extends ManagementEndpoint
in package
implements DeviceCredentialsInterface

Class DeviceCredentials.

Handles requests to the Device Credentials endpoint of the v2 Management API.

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

Interfaces, Classes, Traits and Enums

DeviceCredentialsInterface
Interface DeviceCredentialsInterface.

Table of Contents

$httpClient  : HttpClient
__construct()  : mixed
ManagementEndpoint constructor.
create()  : ResponseInterface
Create a device public key credential.
delete()  : ResponseInterface
Delete a device credential Required scope: `delete:device_credentials`.
get()  : ResponseInterface
Retrieve device credential details for a given user_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

Properties

Methods

__construct()

ManagementEndpoint constructor.

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

httpClient instance to use

Return values
mixed

create()

Create a device public key credential.

public create(string $deviceName, string $type, string $value, string $deviceId[, array<string|int, mixed>|null $body = null ][, RequestOptions|null $options = null ]) : ResponseInterface
Parameters
$deviceName : string

name for this device easily recognized by owner

$type : string

Type of credential. Must be public_key.

$value : string

base64 encoded string containing the credential

$deviceId : string

Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor.

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

Optional. Additional body content 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

delete()

Delete a device credential Required scope: `delete:device_credentials`.

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

ID of the device credential 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

get()

Retrieve device credential details for a given user_id.

public get(string $userId[, string|null $clientId = null ][, string|null $type = null ][, RequestOptions|null $options = null ]) : ResponseInterface

Required scope: read:device_credentials.

Parameters
$userId : string

user ID of the devices to retrieve

$clientId : string|null = null

Optional. Client ID of the devices to retrieve.

$type : string|null = null

Optional. Type of credentials to retrieve. Must be public_key, refresh_token or rotating_refresh_token. The property will default to refresh_token when paging is requested

$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