soap 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +1 -1
- package/History.md +19 -0
- package/Readme.md +79 -21
- package/coverage/coverage.json +1 -0
- package/coverage/lcov-report/base.css +212 -0
- package/coverage/lcov-report/index.html +119 -0
- package/coverage/lcov-report/node-soap/index.html +93 -0
- package/coverage/lcov-report/node-soap/index.js.html +74 -0
- package/coverage/lcov-report/node-soap/lib/client.js.html +1001 -0
- package/coverage/lcov-report/node-soap/lib/http.js.html +416 -0
- package/coverage/lcov-report/node-soap/lib/index.html +171 -0
- package/coverage/lcov-report/node-soap/lib/nscontext.js.html +734 -0
- package/coverage/lcov-report/node-soap/lib/security/BasicAuthSecurity.js.html +137 -0
- package/coverage/lcov-report/node-soap/lib/security/BearerSecurity.js.html +134 -0
- package/coverage/lcov-report/node-soap/lib/security/ClientSSLSecurity.js.html +296 -0
- package/coverage/lcov-report/node-soap/lib/security/ClientSSLSecurityPFX.js.html +218 -0
- package/coverage/lcov-report/node-soap/lib/security/WSSecurity.js.html +278 -0
- package/coverage/lcov-report/node-soap/lib/security/index.html +158 -0
- package/coverage/lcov-report/node-soap/lib/security/index.js.html +92 -0
- package/coverage/lcov-report/node-soap/lib/server.js.html +1139 -0
- package/coverage/lcov-report/node-soap/lib/soap.js.html +314 -0
- package/coverage/lcov-report/node-soap/lib/utils.js.html +161 -0
- package/coverage/lcov-report/node-soap/lib/wsdl.js.html +6275 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +1 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +158 -0
- package/coverage/lcov.info +3325 -0
- package/lib/client.js +21 -18
- package/lib/server.js +17 -6
- package/lib/soap.d.ts +8 -1
- package/lib/wsdl.js +18 -6
- package/package.json +4 -4
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Code coverage report for node-soap/lib/soap.js</title>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
|
7
|
+
<link rel="stylesheet" href="../../base.css" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
<style type='text/css'>
|
|
10
|
+
.coverage-summary .sorter {
|
|
11
|
+
background-image: url(../../sort-arrow-sprite.png);
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div class='wrapper'>
|
|
17
|
+
<div class='pad1'>
|
|
18
|
+
<h1>
|
|
19
|
+
<a href="../../index.html">all files</a> / <a href="index.html">node-soap/lib/</a> soap.js
|
|
20
|
+
</h1>
|
|
21
|
+
<div class='clearfix'>
|
|
22
|
+
<div class='fl pad1y space-right2'>
|
|
23
|
+
<span class="strong">86.96% </span>
|
|
24
|
+
<span class="quiet">Statements</span>
|
|
25
|
+
<span class='fraction'>40/46</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div class='fl pad1y space-right2'>
|
|
28
|
+
<span class="strong">81.25% </span>
|
|
29
|
+
<span class="quiet">Branches</span>
|
|
30
|
+
<span class='fraction'>13/16</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Functions</span>
|
|
35
|
+
<span class='fraction'>6/6</span>
|
|
36
|
+
</div>
|
|
37
|
+
<div class='fl pad1y space-right2'>
|
|
38
|
+
<span class="strong">86.96% </span>
|
|
39
|
+
<span class="quiet">Lines</span>
|
|
40
|
+
<span class='fraction'>40/46</span>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class='status-line high'></div>
|
|
45
|
+
<pre><table class="coverage">
|
|
46
|
+
<tr><td class="line-count quiet">1
|
|
47
|
+
2
|
|
48
|
+
3
|
|
49
|
+
4
|
|
50
|
+
5
|
|
51
|
+
6
|
|
52
|
+
7
|
|
53
|
+
8
|
|
54
|
+
9
|
|
55
|
+
10
|
|
56
|
+
11
|
|
57
|
+
12
|
|
58
|
+
13
|
|
59
|
+
14
|
|
60
|
+
15
|
|
61
|
+
16
|
|
62
|
+
17
|
|
63
|
+
18
|
|
64
|
+
19
|
|
65
|
+
20
|
|
66
|
+
21
|
|
67
|
+
22
|
|
68
|
+
23
|
|
69
|
+
24
|
|
70
|
+
25
|
|
71
|
+
26
|
|
72
|
+
27
|
|
73
|
+
28
|
|
74
|
+
29
|
|
75
|
+
30
|
|
76
|
+
31
|
|
77
|
+
32
|
|
78
|
+
33
|
|
79
|
+
34
|
|
80
|
+
35
|
|
81
|
+
36
|
|
82
|
+
37
|
|
83
|
+
38
|
|
84
|
+
39
|
|
85
|
+
40
|
|
86
|
+
41
|
|
87
|
+
42
|
|
88
|
+
43
|
|
89
|
+
44
|
|
90
|
+
45
|
|
91
|
+
46
|
|
92
|
+
47
|
|
93
|
+
48
|
|
94
|
+
49
|
|
95
|
+
50
|
|
96
|
+
51
|
|
97
|
+
52
|
|
98
|
+
53
|
|
99
|
+
54
|
|
100
|
+
55
|
|
101
|
+
56
|
|
102
|
+
57
|
|
103
|
+
58
|
|
104
|
+
59
|
|
105
|
+
60
|
|
106
|
+
61
|
|
107
|
+
62
|
|
108
|
+
63
|
|
109
|
+
64
|
|
110
|
+
65
|
|
111
|
+
66
|
|
112
|
+
67
|
|
113
|
+
68
|
|
114
|
+
69
|
|
115
|
+
70
|
|
116
|
+
71
|
|
117
|
+
72
|
|
118
|
+
73
|
|
119
|
+
74
|
|
120
|
+
75
|
|
121
|
+
76
|
|
122
|
+
77
|
|
123
|
+
78
|
|
124
|
+
79
|
|
125
|
+
80
|
|
126
|
+
81
|
|
127
|
+
82
|
|
128
|
+
83
|
|
129
|
+
84</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-neutral"> </span>
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
|
+
<span class="cline-any cline-neutral"> </span>
|
|
136
|
+
<span class="cline-any cline-yes">1×</span>
|
|
137
|
+
<span class="cline-any cline-neutral"> </span>
|
|
138
|
+
<span class="cline-any cline-neutral"> </span>
|
|
139
|
+
<span class="cline-any cline-neutral"> </span>
|
|
140
|
+
<span class="cline-any cline-neutral"> </span>
|
|
141
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
|
+
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-neutral"> </span>
|
|
144
|
+
<span class="cline-any cline-yes">1×</span>
|
|
145
|
+
<span class="cline-any cline-yes">1×</span>
|
|
146
|
+
<span class="cline-any cline-neutral"> </span>
|
|
147
|
+
<span class="cline-any cline-yes">1×</span>
|
|
148
|
+
<span class="cline-any cline-yes">134×</span>
|
|
149
|
+
<span class="cline-any cline-no"> </span>
|
|
150
|
+
<span class="cline-any cline-no"> </span>
|
|
151
|
+
<span class="cline-any cline-neutral"> </span>
|
|
152
|
+
<span class="cline-any cline-neutral"> </span>
|
|
153
|
+
<span class="cline-any cline-yes">134×</span>
|
|
154
|
+
<span class="cline-any cline-yes">134×</span>
|
|
155
|
+
<span class="cline-any cline-yes">47×</span>
|
|
156
|
+
<span class="cline-any cline-yes">47×</span>
|
|
157
|
+
<span class="cline-any cline-neutral"> </span>
|
|
158
|
+
<span class="cline-any cline-neutral"> </span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-yes">87×</span>
|
|
161
|
+
<span class="cline-any cline-yes">87×</span>
|
|
162
|
+
<span class="cline-any cline-yes">4×</span>
|
|
163
|
+
<span class="cline-any cline-neutral"> </span>
|
|
164
|
+
<span class="cline-any cline-yes">83×</span>
|
|
165
|
+
<span class="cline-any cline-yes">83×</span>
|
|
166
|
+
<span class="cline-any cline-neutral"> </span>
|
|
167
|
+
<span class="cline-any cline-neutral"> </span>
|
|
168
|
+
<span class="cline-any cline-neutral"> </span>
|
|
169
|
+
<span class="cline-any cline-neutral"> </span>
|
|
170
|
+
<span class="cline-any cline-yes">1×</span>
|
|
171
|
+
<span class="cline-any cline-yes">134×</span>
|
|
172
|
+
<span class="cline-any cline-yes">62×</span>
|
|
173
|
+
<span class="cline-any cline-yes">62×</span>
|
|
174
|
+
<span class="cline-any cline-yes">62×</span>
|
|
175
|
+
<span class="cline-any cline-neutral"> </span>
|
|
176
|
+
<span class="cline-any cline-yes">134×</span>
|
|
177
|
+
<span class="cline-any cline-yes">134×</span>
|
|
178
|
+
<span class="cline-any cline-yes">134×</span>
|
|
179
|
+
<span class="cline-any cline-neutral"> </span>
|
|
180
|
+
<span class="cline-any cline-neutral"> </span>
|
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
|
+
<span class="cline-any cline-yes">1×</span>
|
|
183
|
+
<span class="cline-any cline-yes">23×</span>
|
|
184
|
+
<span class="cline-any cline-neutral"> </span>
|
|
185
|
+
<span class="cline-any cline-neutral"> </span>
|
|
186
|
+
<span class="cline-any cline-yes">23×</span>
|
|
187
|
+
<span class="cline-any cline-no"> </span>
|
|
188
|
+
<span class="cline-any cline-no"> </span>
|
|
189
|
+
<span class="cline-any cline-no"> </span>
|
|
190
|
+
<span class="cline-any cline-no"> </span>
|
|
191
|
+
<span class="cline-any cline-neutral"> </span>
|
|
192
|
+
<span class="cline-any cline-neutral"> </span>
|
|
193
|
+
<span class="cline-any cline-yes">23×</span>
|
|
194
|
+
<span class="cline-any cline-yes">23×</span>
|
|
195
|
+
<span class="cline-any cline-neutral"> </span>
|
|
196
|
+
<span class="cline-any cline-neutral"> </span>
|
|
197
|
+
<span class="cline-any cline-yes">1×</span>
|
|
198
|
+
<span class="cline-any cline-yes">1×</span>
|
|
199
|
+
<span class="cline-any cline-yes">1×</span>
|
|
200
|
+
<span class="cline-any cline-yes">1×</span>
|
|
201
|
+
<span class="cline-any cline-yes">1×</span>
|
|
202
|
+
<span class="cline-any cline-yes">1×</span>
|
|
203
|
+
<span class="cline-any cline-yes">1×</span>
|
|
204
|
+
<span class="cline-any cline-yes">1×</span>
|
|
205
|
+
<span class="cline-any cline-yes">1×</span>
|
|
206
|
+
<span class="cline-any cline-yes">1×</span>
|
|
207
|
+
<span class="cline-any cline-neutral"> </span>
|
|
208
|
+
<span class="cline-any cline-neutral"> </span>
|
|
209
|
+
<span class="cline-any cline-yes">1×</span>
|
|
210
|
+
<span class="cline-any cline-yes">1×</span>
|
|
211
|
+
<span class="cline-any cline-yes">1×</span>
|
|
212
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/*
|
|
213
|
+
* Copyright (c) 2011 Vinay Pulim <vinay@milewise.com>
|
|
214
|
+
* MIT Licensed
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
"use strict";
|
|
218
|
+
|
|
219
|
+
var Client = require('./client').Client,
|
|
220
|
+
Server = require('./server').Server,
|
|
221
|
+
HttpClient = require('./http'),
|
|
222
|
+
security = require('./security'),
|
|
223
|
+
passwordDigest = require('./utils').passwordDigest,
|
|
224
|
+
open_wsdl = require('./wsdl').open_wsdl,
|
|
225
|
+
WSDL = require('./wsdl').WSDL;
|
|
226
|
+
|
|
227
|
+
var WSDL = require('./wsdl').WSDL;
|
|
228
|
+
var _wsdlCache = {};
|
|
229
|
+
|
|
230
|
+
function _requestWSDL(url, options, callback) {
|
|
231
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof options === 'function') {
|
|
232
|
+
<span class="cstat-no" title="statement not covered" > callback = options;</span>
|
|
233
|
+
<span class="cstat-no" title="statement not covered" > options = {};</span>
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
var wsdl = _wsdlCache[url];
|
|
237
|
+
if (wsdl) {
|
|
238
|
+
process.nextTick(function() {
|
|
239
|
+
callback(null, wsdl);
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
open_wsdl(url, options, function(err, wsdl) {
|
|
244
|
+
if (err)
|
|
245
|
+
return callback(err);
|
|
246
|
+
else
|
|
247
|
+
_wsdlCache[url] = wsdl;
|
|
248
|
+
callback(null, wsdl);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function createClient(url, options, callback, endpoint) {
|
|
254
|
+
if (typeof options === 'function') {
|
|
255
|
+
endpoint = callback;
|
|
256
|
+
callback = options;
|
|
257
|
+
options = {};
|
|
258
|
+
}
|
|
259
|
+
endpoint = options.endpoint || endpoint;
|
|
260
|
+
_requestWSDL(url, options, function(err, wsdl) {
|
|
261
|
+
callback(err, wsdl && new Client(wsdl, endpoint, options));
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function listen(server, pathOrOptions, services, xml) {
|
|
266
|
+
var options = {},
|
|
267
|
+
path = pathOrOptions;
|
|
268
|
+
|
|
269
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof pathOrOptions === 'object') {
|
|
270
|
+
<span class="cstat-no" title="statement not covered" > options = pathOrOptions;</span>
|
|
271
|
+
<span class="cstat-no" title="statement not covered" > path = options.path;</span>
|
|
272
|
+
<span class="cstat-no" title="statement not covered" > services = options.services;</span>
|
|
273
|
+
<span class="cstat-no" title="statement not covered" > xml = options.xml;</span>
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
var wsdl = new WSDL(xml || <span class="branch-1 cbranch-no" title="branch not covered" >services,</span> null, options);
|
|
277
|
+
return new Server(server, path, services, wsdl);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
exports.security = security;
|
|
281
|
+
exports.BasicAuthSecurity = security.BasicAuthSecurity;
|
|
282
|
+
exports.WSSecurity = security.WSSecurity;
|
|
283
|
+
exports.ClientSSLSecurity = security.ClientSSLSecurity;
|
|
284
|
+
exports.ClientSSLSecurityPFX = security.ClientSSLSecurityPFX;
|
|
285
|
+
exports.BearerSecurity = security.BearerSecurity;
|
|
286
|
+
exports.createClient = createClient;
|
|
287
|
+
exports.passwordDigest = passwordDigest;
|
|
288
|
+
exports.listen = listen;
|
|
289
|
+
exports.WSDL = WSDL;
|
|
290
|
+
|
|
291
|
+
// Export Client and Server to allow customization
|
|
292
|
+
exports.Server = Server;
|
|
293
|
+
exports.Client = Client;
|
|
294
|
+
exports.HttpClient = HttpClient;
|
|
295
|
+
</pre></td></tr>
|
|
296
|
+
</table></pre>
|
|
297
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
298
|
+
</div><!-- /wrapper -->
|
|
299
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
300
|
+
Code coverage
|
|
301
|
+
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Jan 09 2016 00:43:36 GMT-0700 (MST)
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
<script src="../../prettify.js"></script>
|
|
305
|
+
<script>
|
|
306
|
+
window.onload = function () {
|
|
307
|
+
if (typeof prettyPrint === 'function') {
|
|
308
|
+
prettyPrint();
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
</script>
|
|
312
|
+
<script src="../../sorter.js"></script>
|
|
313
|
+
</body>
|
|
314
|
+
</html>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Code coverage report for node-soap/lib/utils.js</title>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
|
7
|
+
<link rel="stylesheet" href="../../base.css" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
+
<style type='text/css'>
|
|
10
|
+
.coverage-summary .sorter {
|
|
11
|
+
background-image: url(../../sort-arrow-sprite.png);
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div class='wrapper'>
|
|
17
|
+
<div class='pad1'>
|
|
18
|
+
<h1>
|
|
19
|
+
<a href="../../index.html">all files</a> / <a href="index.html">node-soap/lib/</a> utils.js
|
|
20
|
+
</h1>
|
|
21
|
+
<div class='clearfix'>
|
|
22
|
+
<div class='fl pad1y space-right2'>
|
|
23
|
+
<span class="strong">71.43% </span>
|
|
24
|
+
<span class="quiet">Statements</span>
|
|
25
|
+
<span class='fraction'>10/14</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div class='fl pad1y space-right2'>
|
|
28
|
+
<span class="strong">66.67% </span>
|
|
29
|
+
<span class="quiet">Branches</span>
|
|
30
|
+
<span class='fraction'>4/6</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">50% </span>
|
|
34
|
+
<span class="quiet">Functions</span>
|
|
35
|
+
<span class='fraction'>1/2</span>
|
|
36
|
+
</div>
|
|
37
|
+
<div class='fl pad1y space-right2'>
|
|
38
|
+
<span class="strong">69.23% </span>
|
|
39
|
+
<span class="quiet">Lines</span>
|
|
40
|
+
<span class='fraction'>9/13</span>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class='status-line medium'></div>
|
|
45
|
+
<pre><table class="coverage">
|
|
46
|
+
<tr><td class="line-count quiet">1
|
|
47
|
+
2
|
|
48
|
+
3
|
|
49
|
+
4
|
|
50
|
+
5
|
|
51
|
+
6
|
|
52
|
+
7
|
|
53
|
+
8
|
|
54
|
+
9
|
|
55
|
+
10
|
|
56
|
+
11
|
|
57
|
+
12
|
|
58
|
+
13
|
|
59
|
+
14
|
|
60
|
+
15
|
|
61
|
+
16
|
|
62
|
+
17
|
|
63
|
+
18
|
|
64
|
+
19
|
|
65
|
+
20
|
|
66
|
+
21
|
|
67
|
+
22
|
|
68
|
+
23
|
|
69
|
+
24
|
|
70
|
+
25
|
|
71
|
+
26
|
|
72
|
+
27
|
|
73
|
+
28
|
|
74
|
+
29
|
|
75
|
+
30
|
|
76
|
+
31
|
|
77
|
+
32
|
|
78
|
+
33</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
79
|
+
<span class="cline-any cline-neutral"> </span>
|
|
80
|
+
<span class="cline-any cline-yes">1×</span>
|
|
81
|
+
<span class="cline-any cline-yes">1×</span>
|
|
82
|
+
<span class="cline-any cline-neutral"> </span>
|
|
83
|
+
<span class="cline-any cline-no"> </span>
|
|
84
|
+
<span class="cline-any cline-no"> </span>
|
|
85
|
+
<span class="cline-any cline-no"> </span>
|
|
86
|
+
<span class="cline-any cline-no"> </span>
|
|
87
|
+
<span class="cline-any cline-neutral"> </span>
|
|
88
|
+
<span class="cline-any cline-neutral"> </span>
|
|
89
|
+
<span class="cline-any cline-neutral"> </span>
|
|
90
|
+
<span class="cline-any cline-yes">1×</span>
|
|
91
|
+
<span class="cline-any cline-neutral"> </span>
|
|
92
|
+
<span class="cline-any cline-yes">1×</span>
|
|
93
|
+
<span class="cline-any cline-neutral"> </span>
|
|
94
|
+
<span class="cline-any cline-neutral"> </span>
|
|
95
|
+
<span class="cline-any cline-neutral"> </span>
|
|
96
|
+
<span class="cline-any cline-neutral"> </span>
|
|
97
|
+
<span class="cline-any cline-neutral"> </span>
|
|
98
|
+
<span class="cline-any cline-neutral"> </span>
|
|
99
|
+
<span class="cline-any cline-neutral"> </span>
|
|
100
|
+
<span class="cline-any cline-yes">1×</span>
|
|
101
|
+
<span class="cline-any cline-yes">109×</span>
|
|
102
|
+
<span class="cline-any cline-yes">333×</span>
|
|
103
|
+
<span class="cline-any cline-yes">301×</span>
|
|
104
|
+
<span class="cline-any cline-yes">81×</span>
|
|
105
|
+
<span class="cline-any cline-neutral"> </span>
|
|
106
|
+
<span class="cline-any cline-neutral"> </span>
|
|
107
|
+
<span class="cline-any cline-neutral"> </span>
|
|
108
|
+
<span class="cline-any cline-neutral"> </span>
|
|
109
|
+
<span class="cline-any cline-neutral"> </span>
|
|
110
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
|
111
|
+
"use strict";
|
|
112
|
+
var crypto = require('crypto');
|
|
113
|
+
exports.passwordDigest = <span class="fstat-no" title="function not covered" >function passwordDigest(nonce, created, password) {</span>
|
|
114
|
+
// digest = base64 ( sha1 ( nonce + created + password ) )
|
|
115
|
+
<span class="cstat-no" title="statement not covered" > var pwHash = crypto.createHash('sha1');</span>
|
|
116
|
+
<span class="cstat-no" title="statement not covered" > var rawNonce = new Buffer(nonce || '', 'base64').toString('binary');</span>
|
|
117
|
+
<span class="cstat-no" title="statement not covered" > pwHash.update(rawNonce + created + password);</span>
|
|
118
|
+
<span class="cstat-no" title="statement not covered" > return pwHash.digest('base64');</span>
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
var TNS_PREFIX = '__tns__'; // Prefix for targetNamespace
|
|
123
|
+
|
|
124
|
+
exports.TNS_PREFIX = TNS_PREFIX;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Find a key from an object based on the value
|
|
128
|
+
* @param {Object} Namespace prefix/uri mapping
|
|
129
|
+
* @param {*} nsURI value
|
|
130
|
+
* @returns {String} The matching key
|
|
131
|
+
*/
|
|
132
|
+
exports.findPrefix = function(xmlnsMapping, nsURI) {
|
|
133
|
+
for (var n in xmlnsMapping) {
|
|
134
|
+
if (n === TNS_PREFIX) continue;
|
|
135
|
+
if (xmlnsMapping[n] === nsURI)
|
|
136
|
+
return n;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</pre></td></tr>
|
|
143
|
+
</table></pre>
|
|
144
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
145
|
+
</div><!-- /wrapper -->
|
|
146
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
|
+
Code coverage
|
|
148
|
+
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Jan 09 2016 00:43:36 GMT-0700 (MST)
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<script src="../../prettify.js"></script>
|
|
152
|
+
<script>
|
|
153
|
+
window.onload = function () {
|
|
154
|
+
if (typeof prettyPrint === 'function') {
|
|
155
|
+
prettyPrint();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
</script>
|
|
159
|
+
<script src="../../sorter.js"></script>
|
|
160
|
+
</body>
|
|
161
|
+
</html>
|