@docbrasil/api-systemmanager 1.0.107 → 1.0.109
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/.github/workflows/static.yml +43 -0
- package/api/external.js +41 -0
- package/dist/bundle.cjs +41 -0
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +382 -0
- package/docs/Admin.html +336 -0
- package/docs/AdminDocuments.html +2235 -0
- package/docs/AdminForm.html +934 -0
- package/docs/AdminLists.html +895 -0
- package/docs/AdminMessage.html +1490 -0
- package/docs/AdminNotification.html +1636 -0
- package/docs/AdminPlugin.html +696 -0
- package/docs/AdminPolicy.html +451 -0
- package/docs/AdminProcesses.html +692 -0
- package/docs/AdminTask.html +740 -0
- package/docs/AdminUser.html +1203 -0
- package/docs/Datasource.html +660 -0
- package/docs/Dispatch.html +624 -0
- package/docs/Documents.html +4875 -0
- package/docs/External.html +1497 -0
- package/docs/GeoLocation.html +503 -0
- package/docs/Login.html +1839 -0
- package/docs/Notification.html +625 -0
- package/docs/Organization.html +2767 -0
- package/docs/Process.html +1598 -0
- package/docs/Register.html +1604 -0
- package/docs/Session.html +482 -0
- package/docs/Task.html +1394 -0
- package/docs/TaskAvailable.html +893 -0
- package/docs/User.html +2002 -0
- package/docs/Users.html +569 -0
- package/docs/admin_doctypes.js.html +193 -0
- package/docs/admin_document.js.html +449 -0
- package/docs/admin_form.js.html +268 -0
- package/docs/admin_index.js.html +163 -0
- package/docs/admin_list.js.html +250 -0
- package/docs/admin_message.js.html +311 -0
- package/docs/admin_notification.js.html +350 -0
- package/docs/admin_organization.js.html +241 -0
- package/docs/admin_plugin.js.html +233 -0
- package/docs/admin_policy.js.html +195 -0
- package/docs/admin_processes.js.html +487 -0
- package/docs/admin_task.js.html +242 -0
- package/docs/admin_user.js.html +302 -0
- package/docs/dispatch.js.html +218 -0
- package/docs/external.js.html +333 -0
- package/docs/general_geoLocation.js.html +205 -0
- package/docs/general_index.js.html +140 -0
- package/docs/index.html +129 -0
- package/docs/login.js.html +384 -0
- package/docs/scripts/app.min.js +1 -0
- package/docs/scripts/linenumber.js +26 -0
- package/docs/scripts/search.js +39 -0
- package/docs/session.js.html +202 -0
- package/docs/styles/app.min.css +1 -0
- package/docs/styles/iframe.css +13 -0
- package/docs/styles/prettify-jsdoc.css +111 -0
- package/docs/styles/prettify-tomorrow.css +132 -0
- package/docs/styles/reset.css +44 -0
- package/docs/user_datasource.js.html +261 -0
- package/docs/user_document.js.html +847 -0
- package/docs/user_index.js.html +156 -0
- package/docs/user_notification.js.html +218 -0
- package/docs/user_organization.js.html +347 -0
- package/docs/user_process.js.html +352 -0
- package/docs/user_register.js.html +322 -0
- package/docs/user_task.js.html +319 -0
- package/docs/user_task_available.js.html +252 -0
- package/docs/user_user.js.html +404 -0
- package/docs/utils_promises.js.html +235 -0
- package/package.json +7 -4
- package/readme.md +7 -8
- package/doc.md +0 -653
package/docs/Login.html
ADDED
|
@@ -0,0 +1,1839 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<title> Login</title>
|
|
9
|
+
|
|
10
|
+
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
|
|
11
|
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
|
12
|
+
<script src="./build/entry.js"></script>
|
|
13
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
14
|
+
<!--[if lt IE 9]>
|
|
15
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
16
|
+
<![endif]-->
|
|
17
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
|
|
18
|
+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
|
|
19
|
+
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
|
|
20
|
+
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
21
|
+
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
22
|
+
<link type="text/css" rel="stylesheet" href="">
|
|
23
|
+
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<body class="layout small-header">
|
|
31
|
+
<div id="stickyNavbarOverlay"></div>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<div class="top-nav">
|
|
35
|
+
<div class="inner">
|
|
36
|
+
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
37
|
+
<span aria-hidden="true"></span>
|
|
38
|
+
<span aria-hidden="true"></span>
|
|
39
|
+
<span aria-hidden="true"></span>
|
|
40
|
+
</a>
|
|
41
|
+
<div class="logo">
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
<div class="menu">
|
|
46
|
+
|
|
47
|
+
<div class="navigation">
|
|
48
|
+
<a
|
|
49
|
+
href="index.html"
|
|
50
|
+
class="link"
|
|
51
|
+
>
|
|
52
|
+
Documentation
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div id="main">
|
|
62
|
+
<div
|
|
63
|
+
class="sidebar "
|
|
64
|
+
id="sidebarNav"
|
|
65
|
+
>
|
|
66
|
+
|
|
67
|
+
<nav>
|
|
68
|
+
|
|
69
|
+
<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Classes</h3><ul><li><a href="Admin.html">Admin</a></li><li><a href="AdminDocuments.html">AdminDocuments</a></li><li><a href="AdminForm.html">AdminForm</a></li><li><a href="AdminLists.html">AdminLists</a></li><li><a href="AdminMessage.html">AdminMessage</a></li><li><a href="AdminNotification.html">AdminNotification</a></li><li><a href="AdminPlugin.html">AdminPlugin</a></li><li><a href="AdminPolicy.html">AdminPolicy</a></li><li><a href="AdminProcesses.html">AdminProcesses</a></li><li><a href="AdminTask.html">AdminTask</a></li><li><a href="AdminUser.html">AdminUser</a></li><li><a href="Datasource.html">Datasource</a></li><li><a href="Dispatch.html">Dispatch</a></li><li><a href="Documents.html">Documents</a></li><li><a href="External.html">External</a></li><li><a href="GeoLocation.html">GeoLocation</a></li><li><a href="Login.html">Login</a></li><li><a href="Notification.html">Notification</a></li><li><a href="Organization.html">Organization</a></li><li><a href="Process.html">Process</a></li><li><a href="Register.html">Register</a></li><li><a href="Session.html">Session</a></li><li><a href="Task.html">Task</a></li><li><a href="TaskAvailable.html">TaskAvailable</a></li><li><a href="User.html">User</a></li><li><a href="Users.html">Users</a></li></ul></div>
|
|
70
|
+
|
|
71
|
+
</nav>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="core" id="main-content-wrapper">
|
|
74
|
+
<div class="content">
|
|
75
|
+
<header class="page-title">
|
|
76
|
+
<p>Class</p>
|
|
77
|
+
<h1>Login</h1>
|
|
78
|
+
</header>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
<section>
|
|
85
|
+
|
|
86
|
+
<header>
|
|
87
|
+
|
|
88
|
+
<h2><span class="attribs"><span class="type-signature"></span></span>Login<span class="signature">()</span><span class="type-signature"></span></h2>
|
|
89
|
+
|
|
90
|
+
<div class="class-description">Login manager</div>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
</header>
|
|
94
|
+
|
|
95
|
+
<article>
|
|
96
|
+
<div class="container-overview">
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<div class='vertical-section'>
|
|
100
|
+
<div class="members">
|
|
101
|
+
<div class="member">
|
|
102
|
+
<div class=name>
|
|
103
|
+
<span class="tag">Constructor</span>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<h4 class="name" id="Login">
|
|
110
|
+
<a class="href-link" href="#Login">#</a>
|
|
111
|
+
|
|
112
|
+
<span class="code-name">
|
|
113
|
+
|
|
114
|
+
new Login<span class="signature">()</span><span class="type-signature"></span>
|
|
115
|
+
|
|
116
|
+
</span>
|
|
117
|
+
</h4>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<dl class="details">
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<p class="tag-source">
|
|
168
|
+
<a href="login.js.html" class="button">View Source</a>
|
|
169
|
+
<span>
|
|
170
|
+
<a href="login.js.html">login.js</a>, <a href="login.js.html#line7">line 7</a>
|
|
171
|
+
</span>
|
|
172
|
+
</p>
|
|
173
|
+
|
|
174
|
+
</dl>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
<div class='vertical-section'>
|
|
220
|
+
<h1>Methods</h1>
|
|
221
|
+
<div class="members">
|
|
222
|
+
|
|
223
|
+
<div class="member">
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<h4 class="name" id="apiKey">
|
|
228
|
+
<a class="href-link" href="#apiKey">#</a>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<span class='tag'>async</span>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<span class="code-name">
|
|
235
|
+
|
|
236
|
+
apiKey<span class="signature">(apikey)</span><span class="type-signature"> → {promise.<object>|object|object}</span>
|
|
237
|
+
|
|
238
|
+
</span>
|
|
239
|
+
</h4>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<div class="description">
|
|
245
|
+
Login with apikey
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
<h5>Parameters:</h5>
|
|
258
|
+
|
|
259
|
+
<div class="table-container">
|
|
260
|
+
<table class="params table">
|
|
261
|
+
<thead>
|
|
262
|
+
<tr>
|
|
263
|
+
|
|
264
|
+
<th>Name</th>
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
<th>Type</th>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
<th class="last">Description</th>
|
|
274
|
+
</tr>
|
|
275
|
+
</thead>
|
|
276
|
+
|
|
277
|
+
<tbody>
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
<tr class="deep-level-0">
|
|
282
|
+
|
|
283
|
+
<td class="name"><code>apikey</code></td>
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
<td class="type">
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
<code class="param-type">string</code>
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
</td>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<td class="description last">Access key</td>
|
|
300
|
+
</tr>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
</tbody>
|
|
305
|
+
</table>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
<dl class="details">
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
<dt class="tag-author">Author:</dt>
|
|
332
|
+
<dd class="tag-author">
|
|
333
|
+
<ul>
|
|
334
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
335
|
+
</ul>
|
|
336
|
+
</dd>
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
<p class="tag-source">
|
|
352
|
+
<a href="login.js.html" class="button">View Source</a>
|
|
353
|
+
<span>
|
|
354
|
+
<a href="login.js.html">login.js</a>, <a href="login.js.html#line148">line 148</a>
|
|
355
|
+
</span>
|
|
356
|
+
</p>
|
|
357
|
+
|
|
358
|
+
</dl>
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
<div class='columns method-parameter'>
|
|
378
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
379
|
+
<div class="column is-10">
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
<div class="columns">
|
|
384
|
+
|
|
385
|
+
<div class='param-desc column is-7'>data</div>
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
<div class='column is-5 has-text-left'>
|
|
389
|
+
<label>Type: </label>
|
|
390
|
+
|
|
391
|
+
<code class="param-type">promise.<object></code>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
</div>
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
<div class="columns">
|
|
402
|
+
|
|
403
|
+
<div class='param-desc column is-7'>data.auth true or false if we have the user authenticaited correctly</div>
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
<div class='column is-5 has-text-left'>
|
|
407
|
+
<label>Type: </label>
|
|
408
|
+
|
|
409
|
+
<code class="param-type">object</code>
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
</div>
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<div class="columns">
|
|
420
|
+
|
|
421
|
+
<div class='param-desc column is-7'>data.user the logged user</div>
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
<div class='column is-5 has-text-left'>
|
|
425
|
+
<label>Type: </label>
|
|
426
|
+
|
|
427
|
+
<code class="param-type">object</code>
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
</div>
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
<h5>Example</h5>
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
445
|
+
|
|
446
|
+
// Params of the instance
|
|
447
|
+
const params = {...}
|
|
448
|
+
const api = new API(params);
|
|
449
|
+
const apiKey = '043a0eb2-f5c3-4900-b781-7f229d00d092';
|
|
450
|
+
const { auth, user } = await api.login.apiKey(apiKey);</code></pre>
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
</div>
|
|
455
|
+
|
|
456
|
+
<div class="member">
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
<h4 class="name" id="facebook">
|
|
461
|
+
<a class="href-link" href="#facebook">#</a>
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
<span class='tag'>async</span>
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
<span class="code-name">
|
|
468
|
+
|
|
469
|
+
facebook<span class="signature">(params)</span><span class="type-signature"> → {promise.<object>|object|object}</span>
|
|
470
|
+
|
|
471
|
+
</span>
|
|
472
|
+
</h4>
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
<div class="description">
|
|
478
|
+
Login with social login Facebook
|
|
479
|
+
</div>
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
<h5>Parameters:</h5>
|
|
491
|
+
|
|
492
|
+
<div class="table-container">
|
|
493
|
+
<table class="params table">
|
|
494
|
+
<thead>
|
|
495
|
+
<tr>
|
|
496
|
+
|
|
497
|
+
<th>Name</th>
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
<th>Type</th>
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
<th class="last">Description</th>
|
|
507
|
+
</tr>
|
|
508
|
+
</thead>
|
|
509
|
+
|
|
510
|
+
<tbody>
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
<tr class="deep-level-0">
|
|
515
|
+
|
|
516
|
+
<td class="name"><code>params</code></td>
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
<td class="type">
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
<code class="param-type">object</code>
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
</td>
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
<td class="description last">Params to login Facebook</td>
|
|
533
|
+
</tr>
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
<tr class="deep-level-1">
|
|
539
|
+
|
|
540
|
+
<td class="name"><code>accessToken</code></td>
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
<td class="type">
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
<code class="param-type">string</code>
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
</td>
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
<td class="description last">Access token of the system manager</td>
|
|
557
|
+
</tr>
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
<tr class="deep-level-1">
|
|
562
|
+
|
|
563
|
+
<td class="name"><code>initialUserData</code></td>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
<td class="type">
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
<code class="param-type">object</code>
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
</td>
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
<td class="description last">Object with roles default if sigin</td>
|
|
580
|
+
</tr>
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
<tr class="deep-level-1">
|
|
585
|
+
|
|
586
|
+
<td class="name"><code>initialUserData.externalRoles</code></td>
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
<td class="type">
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
<code class="param-type">array</code>
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
</td>
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
<td class="description last">Array with permission of user</td>
|
|
603
|
+
</tr>
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
</tbody>
|
|
610
|
+
</table>
|
|
611
|
+
</div>
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
<dl class="details">
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
<dt class="tag-author">Author:</dt>
|
|
637
|
+
<dd class="tag-author">
|
|
638
|
+
<ul>
|
|
639
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
640
|
+
</ul>
|
|
641
|
+
</dd>
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
<p class="tag-source">
|
|
657
|
+
<a href="login.js.html" class="button">View Source</a>
|
|
658
|
+
<span>
|
|
659
|
+
<a href="login.js.html">login.js</a>, <a href="login.js.html#line71">line 71</a>
|
|
660
|
+
</span>
|
|
661
|
+
</p>
|
|
662
|
+
|
|
663
|
+
</dl>
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
<div class='columns method-parameter'>
|
|
683
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
684
|
+
<div class="column is-10">
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
<div class="columns">
|
|
689
|
+
|
|
690
|
+
<div class='param-desc column is-7'>data</div>
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
<div class='column is-5 has-text-left'>
|
|
694
|
+
<label>Type: </label>
|
|
695
|
+
|
|
696
|
+
<code class="param-type">promise.<object></code>
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
</div>
|
|
700
|
+
|
|
701
|
+
</div>
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
<div class="columns">
|
|
707
|
+
|
|
708
|
+
<div class='param-desc column is-7'>data.auth true or false if we have the user authenticaited correctly</div>
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
<div class='column is-5 has-text-left'>
|
|
712
|
+
<label>Type: </label>
|
|
713
|
+
|
|
714
|
+
<code class="param-type">object</code>
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
</div>
|
|
718
|
+
|
|
719
|
+
</div>
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
<div class="columns">
|
|
725
|
+
|
|
726
|
+
<div class='param-desc column is-7'>data.user the logged user</div>
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
<div class='column is-5 has-text-left'>
|
|
730
|
+
<label>Type: </label>
|
|
731
|
+
|
|
732
|
+
<code class="param-type">object</code>
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
</div>
|
|
736
|
+
|
|
737
|
+
</div>
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
</div>
|
|
741
|
+
</div>
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
<h5>Example</h5>
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
750
|
+
|
|
751
|
+
// Params of the instance
|
|
752
|
+
const params = {...}
|
|
753
|
+
const api = new API(params);
|
|
754
|
+
const params = { accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cC...' };
|
|
755
|
+
const { auth, user } = await api.login.facebook(params);</code></pre>
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
</div>
|
|
760
|
+
|
|
761
|
+
<div class="member">
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
<h4 class="name" id="google">
|
|
766
|
+
<a class="href-link" href="#google">#</a>
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
<span class='tag'>async</span>
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
<span class="code-name">
|
|
773
|
+
|
|
774
|
+
google<span class="signature">(params)</span><span class="type-signature"> → {promise.<object>|object|object}</span>
|
|
775
|
+
|
|
776
|
+
</span>
|
|
777
|
+
</h4>
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
<div class="description">
|
|
783
|
+
Login with social login Google
|
|
784
|
+
</div>
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
<h5>Parameters:</h5>
|
|
796
|
+
|
|
797
|
+
<div class="table-container">
|
|
798
|
+
<table class="params table">
|
|
799
|
+
<thead>
|
|
800
|
+
<tr>
|
|
801
|
+
|
|
802
|
+
<th>Name</th>
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
<th>Type</th>
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
<th class="last">Description</th>
|
|
812
|
+
</tr>
|
|
813
|
+
</thead>
|
|
814
|
+
|
|
815
|
+
<tbody>
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
<tr class="deep-level-0">
|
|
820
|
+
|
|
821
|
+
<td class="name"><code>params</code></td>
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
<td class="type">
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
<code class="param-type">object</code>
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
</td>
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
<td class="description last">Params to login Google</td>
|
|
838
|
+
</tr>
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
<tr class="deep-level-1">
|
|
844
|
+
|
|
845
|
+
<td class="name"><code>accessToken</code></td>
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
<td class="type">
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
<code class="param-type">string</code>
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
</td>
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
<td class="description last">Access token of the system manager</td>
|
|
862
|
+
</tr>
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
<tr class="deep-level-1">
|
|
867
|
+
|
|
868
|
+
<td class="name"><code>initialUserData</code></td>
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
<td class="type">
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
<code class="param-type">object</code>
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
</td>
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
<td class="description last">Object with roles default if sigin</td>
|
|
885
|
+
</tr>
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
<tr class="deep-level-1">
|
|
890
|
+
|
|
891
|
+
<td class="name"><code>initialUserData.externalRoles</code></td>
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
<td class="type">
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
<code class="param-type">array</code>
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
</td>
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
<td class="description last">Array with permission of user</td>
|
|
908
|
+
</tr>
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
</tbody>
|
|
915
|
+
</table>
|
|
916
|
+
</div>
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
<dl class="details">
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
<dt class="tag-author">Author:</dt>
|
|
942
|
+
<dd class="tag-author">
|
|
943
|
+
<ul>
|
|
944
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
945
|
+
</ul>
|
|
946
|
+
</dd>
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
<p class="tag-source">
|
|
962
|
+
<a href="login.js.html" class="button">View Source</a>
|
|
963
|
+
<span>
|
|
964
|
+
<a href="login.js.html">login.js</a>, <a href="login.js.html#line111">line 111</a>
|
|
965
|
+
</span>
|
|
966
|
+
</p>
|
|
967
|
+
|
|
968
|
+
</dl>
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
<div class='columns method-parameter'>
|
|
988
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
989
|
+
<div class="column is-10">
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
<div class="columns">
|
|
994
|
+
|
|
995
|
+
<div class='param-desc column is-7'>data</div>
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
<div class='column is-5 has-text-left'>
|
|
999
|
+
<label>Type: </label>
|
|
1000
|
+
|
|
1001
|
+
<code class="param-type">promise.<object></code>
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
</div>
|
|
1005
|
+
|
|
1006
|
+
</div>
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
<div class="columns">
|
|
1012
|
+
|
|
1013
|
+
<div class='param-desc column is-7'>data.auth true or false if we have the user authenticaited correctly</div>
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
<div class='column is-5 has-text-left'>
|
|
1017
|
+
<label>Type: </label>
|
|
1018
|
+
|
|
1019
|
+
<code class="param-type">object</code>
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
</div>
|
|
1023
|
+
|
|
1024
|
+
</div>
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
<div class="columns">
|
|
1030
|
+
|
|
1031
|
+
<div class='param-desc column is-7'>data.user the logged user</div>
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
<div class='column is-5 has-text-left'>
|
|
1035
|
+
<label>Type: </label>
|
|
1036
|
+
|
|
1037
|
+
<code class="param-type">object</code>
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
</div>
|
|
1041
|
+
|
|
1042
|
+
</div>
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
</div>
|
|
1046
|
+
</div>
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
<h5>Example</h5>
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
1055
|
+
|
|
1056
|
+
// Params of the instance
|
|
1057
|
+
const params = {...}
|
|
1058
|
+
const api = new API(params);
|
|
1059
|
+
const accessToken = 'eyJhbGciOiJIUzI1NiIsInR5cC...';
|
|
1060
|
+
const { auth, user } = await api.login.google(accessToken);</code></pre>
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
</div>
|
|
1065
|
+
|
|
1066
|
+
<div class="member">
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
<h4 class="name" id="logout">
|
|
1071
|
+
<a class="href-link" href="#logout">#</a>
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
<span class='tag'>async</span>
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
<span class="code-name">
|
|
1078
|
+
|
|
1079
|
+
logout<span class="signature">(session)</span><span class="type-signature"> → {promise.<object>|boolean}</span>
|
|
1080
|
+
|
|
1081
|
+
</span>
|
|
1082
|
+
</h4>
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
<div class="description">
|
|
1088
|
+
Logout user system manager
|
|
1089
|
+
</div>
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
<h5>Parameters:</h5>
|
|
1101
|
+
|
|
1102
|
+
<div class="table-container">
|
|
1103
|
+
<table class="params table">
|
|
1104
|
+
<thead>
|
|
1105
|
+
<tr>
|
|
1106
|
+
|
|
1107
|
+
<th>Name</th>
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
<th>Type</th>
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
<th class="last">Description</th>
|
|
1117
|
+
</tr>
|
|
1118
|
+
</thead>
|
|
1119
|
+
|
|
1120
|
+
<tbody>
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
<tr class="deep-level-0">
|
|
1125
|
+
|
|
1126
|
+
<td class="name"><code>session</code></td>
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
<td class="type">
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
<code class="param-type">string</code>
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
</td>
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
<td class="description last">Session, token JWT</td>
|
|
1143
|
+
</tr>
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
</tbody>
|
|
1148
|
+
</table>
|
|
1149
|
+
</div>
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
<dl class="details">
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
<dt class="tag-author">Author:</dt>
|
|
1175
|
+
<dd class="tag-author">
|
|
1176
|
+
<ul>
|
|
1177
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
1178
|
+
</ul>
|
|
1179
|
+
</dd>
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
<p class="tag-source">
|
|
1195
|
+
<a href="login.js.html" class="button">View Source</a>
|
|
1196
|
+
<span>
|
|
1197
|
+
<a href="login.js.html">login.js</a>, <a href="login.js.html#line222">line 222</a>
|
|
1198
|
+
</span>
|
|
1199
|
+
</p>
|
|
1200
|
+
|
|
1201
|
+
</dl>
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
<div class='columns method-parameter'>
|
|
1221
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1222
|
+
<div class="column is-10">
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
<div class="columns">
|
|
1227
|
+
|
|
1228
|
+
<div class='param-desc column is-7'>} data</div>
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
<div class='column is-5 has-text-left'>
|
|
1232
|
+
<label>Type: </label>
|
|
1233
|
+
|
|
1234
|
+
<code class="param-type">promise.<object></code>
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
</div>
|
|
1238
|
+
|
|
1239
|
+
</div>
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
<div class="columns">
|
|
1245
|
+
|
|
1246
|
+
<div class='param-desc column is-7'>data.success true|false</div>
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
<div class='column is-5 has-text-left'>
|
|
1250
|
+
<label>Type: </label>
|
|
1251
|
+
|
|
1252
|
+
<code class="param-type">boolean</code>
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
</div>
|
|
1256
|
+
|
|
1257
|
+
</div>
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
</div>
|
|
1261
|
+
</div>
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
<h5>Example</h5>
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
1270
|
+
|
|
1271
|
+
// Params of the instance
|
|
1272
|
+
const params = {...}
|
|
1273
|
+
const api = new API(params);
|
|
1274
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1275
|
+
const { success } = await api.login.logout(session);</code></pre>
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
</div>
|
|
1280
|
+
|
|
1281
|
+
<div class="member">
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
<h4 class="name" id="recover">
|
|
1286
|
+
<a class="href-link" href="#recover">#</a>
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
<span class='tag'>async</span>
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
<span class="code-name">
|
|
1293
|
+
|
|
1294
|
+
recover<span class="signature">(username)</span><span class="type-signature"> → {promise.<object>|boolean}</span>
|
|
1295
|
+
|
|
1296
|
+
</span>
|
|
1297
|
+
</h4>
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
<div class="description">
|
|
1303
|
+
Recover the password
|
|
1304
|
+
</div>
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
<h5>Parameters:</h5>
|
|
1316
|
+
|
|
1317
|
+
<div class="table-container">
|
|
1318
|
+
<table class="params table">
|
|
1319
|
+
<thead>
|
|
1320
|
+
<tr>
|
|
1321
|
+
|
|
1322
|
+
<th>Name</th>
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
<th>Type</th>
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
<th class="last">Description</th>
|
|
1332
|
+
</tr>
|
|
1333
|
+
</thead>
|
|
1334
|
+
|
|
1335
|
+
<tbody>
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
<tr class="deep-level-0">
|
|
1340
|
+
|
|
1341
|
+
<td class="name"><code>username</code></td>
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
<td class="type">
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
<code class="param-type">string</code>
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
</td>
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
<td class="description last">The username or email</td>
|
|
1358
|
+
</tr>
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
</tbody>
|
|
1363
|
+
</table>
|
|
1364
|
+
</div>
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
<dl class="details">
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
<dt class="tag-author">Author:</dt>
|
|
1390
|
+
<dd class="tag-author">
|
|
1391
|
+
<ul>
|
|
1392
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
1393
|
+
</ul>
|
|
1394
|
+
</dd>
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
<p class="tag-source">
|
|
1410
|
+
<a href="login.js.html" class="button">View Source</a>
|
|
1411
|
+
<span>
|
|
1412
|
+
<a href="login.js.html">login.js</a>, <a href="login.js.html#line252">line 252</a>
|
|
1413
|
+
</span>
|
|
1414
|
+
</p>
|
|
1415
|
+
|
|
1416
|
+
</dl>
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
<div class='columns method-parameter'>
|
|
1436
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1437
|
+
<div class="column is-10">
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
<div class="columns">
|
|
1442
|
+
|
|
1443
|
+
<div class='param-desc column is-7'>} data</div>
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
<div class='column is-5 has-text-left'>
|
|
1447
|
+
<label>Type: </label>
|
|
1448
|
+
|
|
1449
|
+
<code class="param-type">promise.<object></code>
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
</div>
|
|
1453
|
+
|
|
1454
|
+
</div>
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
<div class="columns">
|
|
1460
|
+
|
|
1461
|
+
<div class='param-desc column is-7'>data.success true|false</div>
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
<div class='column is-5 has-text-left'>
|
|
1465
|
+
<label>Type: </label>
|
|
1466
|
+
|
|
1467
|
+
<code class="param-type">boolean</code>
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
</div>
|
|
1471
|
+
|
|
1472
|
+
</div>
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
</div>
|
|
1476
|
+
</div>
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
<h5>Example</h5>
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
1485
|
+
|
|
1486
|
+
// Params of the instance
|
|
1487
|
+
const params = {...}
|
|
1488
|
+
const api = new API(params);
|
|
1489
|
+
const { success } = await api.login.recover('myusername');</code></pre>
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
</div>
|
|
1494
|
+
|
|
1495
|
+
<div class="member">
|
|
1496
|
+
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
<h4 class="name" id="userPass">
|
|
1500
|
+
<a class="href-link" href="#userPass">#</a>
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
<span class='tag'>async</span>
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
<span class="code-name">
|
|
1507
|
+
|
|
1508
|
+
userPass<span class="signature">(params)</span><span class="type-signature"> → {promise.<object>|object|object}</span>
|
|
1509
|
+
|
|
1510
|
+
</span>
|
|
1511
|
+
</h4>
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
<div class="description">
|
|
1517
|
+
Login with user and password
|
|
1518
|
+
</div>
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
<h5>Parameters:</h5>
|
|
1530
|
+
|
|
1531
|
+
<div class="table-container">
|
|
1532
|
+
<table class="params table">
|
|
1533
|
+
<thead>
|
|
1534
|
+
<tr>
|
|
1535
|
+
|
|
1536
|
+
<th>Name</th>
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
<th>Type</th>
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
<th class="last">Description</th>
|
|
1546
|
+
</tr>
|
|
1547
|
+
</thead>
|
|
1548
|
+
|
|
1549
|
+
<tbody>
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
<tr class="deep-level-0">
|
|
1554
|
+
|
|
1555
|
+
<td class="name"><code>params</code></td>
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
<td class="type">
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
<code class="param-type">object</code>
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
</td>
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
<td class="description last">Object with user and password</td>
|
|
1572
|
+
</tr>
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
<tr class="deep-level-1">
|
|
1578
|
+
|
|
1579
|
+
<td class="name"><code>username</code></td>
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
<td class="type">
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
<code class="param-type">string</code>
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
</td>
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
<td class="description last">Username or email of the user</td>
|
|
1596
|
+
</tr>
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
<tr class="deep-level-1">
|
|
1601
|
+
|
|
1602
|
+
<td class="name"><code>password</code></td>
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
<td class="type">
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
<code class="param-type">string</code>
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
</td>
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
<td class="description last">Password of the user</td>
|
|
1619
|
+
</tr>
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
<tr class="deep-level-1">
|
|
1624
|
+
|
|
1625
|
+
<td class="name"><code>orgname</code></td>
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
<td class="type">
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
<code class="param-type">string</code>
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
|
|
1635
|
+
</td>
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
<td class="description last">The organame of the user</td>
|
|
1642
|
+
</tr>
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
</tbody>
|
|
1649
|
+
</table>
|
|
1650
|
+
</div>
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
<dl class="details">
|
|
1657
|
+
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
<dt class="tag-author">Author:</dt>
|
|
1676
|
+
<dd class="tag-author">
|
|
1677
|
+
<ul>
|
|
1678
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
1679
|
+
</ul>
|
|
1680
|
+
</dd>
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
<p class="tag-source">
|
|
1696
|
+
<a href="login.js.html" class="button">View Source</a>
|
|
1697
|
+
<span>
|
|
1698
|
+
<a href="login.js.html">login.js</a>, <a href="login.js.html#line185">line 185</a>
|
|
1699
|
+
</span>
|
|
1700
|
+
</p>
|
|
1701
|
+
|
|
1702
|
+
</dl>
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
<div class='columns method-parameter'>
|
|
1722
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1723
|
+
<div class="column is-10">
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
<div class="columns">
|
|
1728
|
+
|
|
1729
|
+
<div class='param-desc column is-7'>data</div>
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
<div class='column is-5 has-text-left'>
|
|
1733
|
+
<label>Type: </label>
|
|
1734
|
+
|
|
1735
|
+
<code class="param-type">promise.<object></code>
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
</div>
|
|
1739
|
+
|
|
1740
|
+
</div>
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
<div class="columns">
|
|
1746
|
+
|
|
1747
|
+
<div class='param-desc column is-7'>data.auth true or false if we have the user authenticaited correctly</div>
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
<div class='column is-5 has-text-left'>
|
|
1751
|
+
<label>Type: </label>
|
|
1752
|
+
|
|
1753
|
+
<code class="param-type">object</code>
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
</div>
|
|
1757
|
+
|
|
1758
|
+
</div>
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
<div class="columns">
|
|
1764
|
+
|
|
1765
|
+
<div class='param-desc column is-7'>data.user the logged user</div>
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
<div class='column is-5 has-text-left'>
|
|
1769
|
+
<label>Type: </label>
|
|
1770
|
+
|
|
1771
|
+
<code class="param-type">object</code>
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
</div>
|
|
1775
|
+
|
|
1776
|
+
</div>
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
</div>
|
|
1780
|
+
</div>
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
<h5>Example</h5>
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
1789
|
+
|
|
1790
|
+
// Params of the instance
|
|
1791
|
+
const params = {...}
|
|
1792
|
+
const api = new API(params);
|
|
1793
|
+
const params = {
|
|
1794
|
+
username: 'ana.silva@gmail.com',
|
|
1795
|
+
password: '123456'
|
|
1796
|
+
};
|
|
1797
|
+
const { auth, user } = await api.login.userPass(params);</code></pre>
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
</div>
|
|
1802
|
+
|
|
1803
|
+
</div>
|
|
1804
|
+
</div>
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
</article>
|
|
1811
|
+
|
|
1812
|
+
</section>
|
|
1813
|
+
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
|
|
1817
|
+
</div>
|
|
1818
|
+
|
|
1819
|
+
<footer class="footer">
|
|
1820
|
+
<div class="content has-text-centered">
|
|
1821
|
+
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a></p>
|
|
1822
|
+
<p class="sidebar-created-by">
|
|
1823
|
+
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
|
|
1824
|
+
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
|
|
1825
|
+
</p>
|
|
1826
|
+
</div>
|
|
1827
|
+
</footer>
|
|
1828
|
+
|
|
1829
|
+
</div>
|
|
1830
|
+
<div id="side-nav" class="side-nav">
|
|
1831
|
+
</div>
|
|
1832
|
+
</div>
|
|
1833
|
+
<script src="scripts/app.min.js"></script>
|
|
1834
|
+
<script>PR.prettyPrint();</script>
|
|
1835
|
+
<script src="scripts/linenumber.js"> </script>
|
|
1836
|
+
|
|
1837
|
+
|
|
1838
|
+
</body>
|
|
1839
|
+
</html>
|