Constructor
new DeviceCredentialsManager(options)
Parameters:
Name |
Type |
Description |
options |
Object
|
The client options.
Properties
Name |
Type |
Attributes |
Description |
baseUrl |
String
|
|
The URL of the API. |
headers |
Object
|
<optional>
|
Headers to be included in all requests. |
|
- Source:
Members
resource :external:RestDeviceCredentialsManager
Type:
-
external:RestDeviceCredentialsManager
- Source:
(inner) clientOptions :Object
Options object for the RestClient instance.
Type:
- Source:
Methods
create(data, cbopt) → {Promise|undefined}
Create an Auth0 credential.
Parameters:
Name |
Type |
Attributes |
Description |
data |
Object
|
|
The device credential data object. |
cb |
function
|
<optional>
|
Callback function. |
- Source:
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.
Parameters:
Name |
Type |
Attributes |
Description |
params |
Object
|
|
Credential parameters.
Properties
Name |
Type |
Description |
id |
String
|
Device credential ID. |
|
cb |
function
|
<optional>
|
Callback function. |
- Source:
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.
Parameters:
Name |
Type |
Attributes |
Description |
cb |
function
|
<optional>
|
Callback function. |
- Source:
Returns:
-
Type
-
Promise
|
undefined
Example
management.deviceCredentials.getAll(function (err, credentials) {
console.log(credentials.length);
});