-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
54 lines (52 loc) · 1.28 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const RemoteStorage = require('remotestoragejs');
const CredentialsStore = require('remotestorage-util-credentials-store');
/**
* File: XMPP Credentials
*
* Maintainer: - Nick Jennings <[email protected]>
* Version: - 0.2.0
*
*/
RemoteStorage.defineModule('xmpp-credentials', function(privClient) {
/**
* Schema: xmpp/credentials
*
* Credentials for XMPP
*
* username - username (string)
* password - password (string)
* server - the xmpp server to connect to (string)
* resource - the resource name (string)
* port - the port to connect to (number)
*/
privClient.declareType('credentials', {
type: 'object',
description: 'XMPP credentials file',
required: ['username', 'password', 'server', 'resource'],
additionalProperties: false,
properties: {
uri: {
type: 'string',
description: 'unique identifier complete with URI prefix. ie. xmpp:[email protected]'
},
username: {
type: 'string'
},
password: {
type: 'string'
},
server: {
type: 'uri'
},
resource : {
type: 'string'
},
port: {
type: 'number'
}
}
});
return {
exports: new CredentialsStore('xmpp-credentials', privClient)
};
});