Auth0-PHP

DeviceCredentialsInterface
in

Interface DeviceCredentialsInterface.

Table of Contents

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.

Methods

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.)

Tags
throws
ArgumentException

when an invalid deviceName, type, value, or deviceId are provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Device_Credentials/post_device_credentials
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.)

Tags
throws
ArgumentException

when an invalid id is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Device_Credentials/delete_device_credentials_by_id
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.)

Tags
throws
ArgumentException

when an invalid userId is provided

throws
NetworkException

when the API request fails due to a network error

see
https://auth0.com/docs/api/management/v2#!/Device_Credentials/get_device_credentials
Return values
ResponseInterface

Search results