Constructor
+ + +new ClientCredentialsManager(options)
+ + + + + + + + + +-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Parameters:
+ + +Name | + + +Type | + + + + + +Description | +||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+
+
+
+
+ The client options. + + + +
|
+
Members
+ + + +resource :external:RestClient
+ + + + + + + + +-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Type:
+-
+
-
+
+
external:RestClient
+ + +
+
Methods
+ + + +create(data, cbopt) → {Promise|undefined}
+ + + + + +Create a new client credential.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
params.client_id |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+ + + + + + + | + + + + +
+ The client id. + + |
+
data |
+
+
+
+
+
+object
+
+
+
+ |
+
+
+ + + + + + + | + + + + +
+ Client Credential data object. + + |
+
cb |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+ <optional> + + + + + + |
+
+
+
+
+
+ Callback function. + + |
+
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+
Example
+ +var params = { client_id: CLIENT_ID };
+
+management.clientCredentials.create(params, data, function (err, credential) {
+ if (err) {
+ // Handle error.
+ }
+
+ // The credential created.
+ console.log({credential});
+});
+
+delete(cbopt) → {Promise|undefined}
+ + + + + +Delete a credential for a given client.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
params.client_id |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+ + + + + + + | + + + + +
+ The client id. + + |
+
params.credential_id |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+ + + + + + + | + + + + +
+ The credential id. + + |
+
cb |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+ <optional> + + + + + + |
+
+
+
+
+
+ Callback function. + + |
+
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+
Example
+ +var params = { client_id: CLIENT_ID, credential_id: CREDENTIAL_ID };
+
+management.clientCredentials.delete(params, data, function (err) {
+ if (err) {
+ // Handle error.
+ }
+});
+
+get(cbopt) → {Promise|undefined}
+ + + + + +Return a credential for a given client.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
params.client_id |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+ + + + + + + | + + + + +
+ The client id. + + |
+
params.credential_id |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+ + + + + + + | + + + + +
+ The credential id. + + |
+
cb |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+ <optional> + + + + + + |
+
+
+
+
+
+ Callback function. + + |
+
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+
Example
+ +var params = { client_id: CLIENT_ID, credential_id: CREDENTIAL_ID };
+
+management.clientCredentials.getById(data, function (err, credential) {
+ if (err) {
+ // Handle error.
+ }
+
+ // A specific credential associated with that credential.
+ console.log({credential});
+});
+
+getAll(cbopt) → {Promise|undefined}
+ + + + + +Return a list of credentials for a given client.
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
params.client_id |
+
+
+
+
+
+string
+
+
+
+ |
+
+
+ + + + + + + | + + + + +
+ The client id. + + |
+
cb |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+ <optional> + + + + + + |
+
+
+
+
+
+ Callback function. + + |
+
Returns:
+ + + +-
+
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+
Example
+ +var params = { client_id: CLIENT_ID };
+
+management.clientCredentials.getAll(params, function (err, credentials) {
+ if (err) {
+ // Handle error.
+ }
+
+ // A list of credentials associated with that client.
+ console.log({credentials});
+});
+
+