ClientProvider
Summary
Defines a ClientProvider to get and save Web Service client applications.
Constructor
ClientProvider
Syntax
ClientProvider
(
-
database
Summary
Parameters:
-
database
DatabaseThe database storing the clients
Item Index
Methods
Methods
add
Syntax
add
(
async
-
clients
-
[callback]
Summary
Adds Web Service client applications.
When adding a client a secret is automatically generated.
Parameters:
-
clients
ArrayThe list of clients to store with for each client:
- String name The client name
- String [id] The client id, generated if not specified
- Array [scopes] The client scopes
-
[callback]
Function optionalThe function to call when it's done
- Error The error if an error occurred, null otherwise
- Number The total amount of clients inserted
- Array The list of added clients
createIndexes
Syntax
createIndexes
(
async
-
callback
Summary
Creates clients indexes.
Parameters:
-
callback
FunctionFunction to call when it's done with :
- Error An error if something went wrong, null otherwise
updateOne
Syntax
updateOne
(
async
-
[filter]
-
data
-
[callback]
Summary
Updates a client.