DeviceCredentialsManager

management. DeviceCredentialsManager

DeviceCredentialsManager Manages Auth0 Device Credentials.

Constructor

new DeviceCredentialsManager(options)

Source:
Parameters:
Name Type Description
options Object

The client options.

Name Type Attributes Description
baseUrl String

The URL of the API.

headers Object <optional>

Headers to be included in all requests.

retry Object <optional>

Retry Policy Config

Members

(inner) auth0RestClient :external:RestClient

Provides an abstraction layer for consuming the Auth0 DeviceCredentialsManagers endpoint.

Source:
Type:

(inner) clientOptions :Object

Options object for the RestClient instance.

Source:
Type:
  • Object

Methods

create(data, cbopt) → {Promise|undefined}

Create an Auth0 credential.

Source:
Parameters:
Name Type Attributes Description
data Object

The device credential data object.

cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example
management.deviceCredentials.create(data, function (err) {
  if (err) {
    // Handle error.
  }

  // Credential created.
});

delete(params, cbopt) → {Promise|undefined}

Delete an Auth0 device credential.

Source:
Parameters:
Name Type Attributes Description
params Object

Credential parameters.

Name Type Description
id String

Device credential ID.

cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example
var params = { id: CREDENTIAL_ID };

management.deviceCredentials.delete(params, function (err) {
  if (err) {
    // Handle error.
  }

  // Credential deleted.
});

getAll(cbopt) → {Promise|undefined}

Get all Auth0 credentials.

Source:
Parameters:
Name Type Attributes Description
cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example
management.deviceCredentials.getAll(function (err, credentials) {
  console.log(credentials.length);
});