Commit fad2a65
Marc Graham
Add jwt support for thing-url-adapter (#96)
* Add ability to provide jwts for adapter urls and wss
If url -- set auth to bearer with jwt
If wss -- Add to query string
Load jwt_auth object at start
from jwt_auth.json file. In the same dir as addon
hostname.local:port : token
* refactor code -- use a function to get a configured header.
move jwt_auth.json to .mozilla-iot/config
* Update readme.
* Update readme.
* Update readme.
* Update readme.
* modified mainfest to add config option for adding jwts on the adapter config page.
added secureThings property
add to db as:
<hostname>:<port> <jwt>
with a space between
* update read me
* add check to see if secureThings is in config
* #96 (comment)
Renamed getHeaders to getHeaders().
* #96 (comment)
Change query param for websocket to ?jwt=<token>
* #96 (comment)
remove unneeded ws==null check
* #96 (comment)
Modify manifest.json to collect parameters for jwt, basic and digest auth. Store in config.
Update load thing to pull data for auth from config url data.
Massaged functions as needed to accomodate the auth stuff.
Only JWT is implemented in the adapter code. Stubs are in place to add basic and digest.
Will have to add code at lines 52, 297, and 856
* #96 (comment)
#96 (comment)
#96 (comment)
Proper naming, remove unneeded comments, remove console.log of AUTH_DATA
* #96 (comment)
Add config file update to loadThingURLAdapter.
* #96 (comment)
Add 'none' to auth mehtods. On upgrade of config and authenticaton object is added with a method property of 'none'
* #96 (comment)
move getHeaders function and authData to ThingURLAdapter.
Added adapter property to ThingURLDevice and set it in the constructor.
Changed all the getHeader() call accordingly.
* #96 (comment)
Update read me with instructions for secure thing usage.
Change rev to 5.0 in manifest and package.jsnon
* #96 (comment)
Types and grammar.
* #96 (comment)
Types and grammar.
* Latest polishing of code
Remove redundant this.adapter
Use part of authentication object for authData
Typos and capitolization
* Remove unneeded console.log statement
* Remove un-needed comments.
Correct getHeaders for eventsUrl and perfromAction
Rename variable url_stub
* Refactor for loops
* correct incorrect spelling1 parent 06dc9e4 commit fad2a65
File tree
8 files changed
+180
-32
lines changed- images
8 files changed
+180
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
Loading
Loading
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
34 | 77 | | |
35 | 78 | | |
36 | 79 | | |
| |||
41 | 84 | | |
42 | 85 | | |
43 | 86 | | |
44 | | - | |
| 87 | + | |
45 | 88 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
269 | 285 | | |
270 | 286 | | |
271 | 287 | | |
| |||
363 | 379 | | |
364 | 380 | | |
365 | 381 | | |
| 382 | + | |
366 | 383 | | |
367 | | - | |
368 | | - | |
369 | | - | |
| 384 | + | |
370 | 385 | | |
371 | 386 | | |
372 | 387 | | |
| |||
381 | 396 | | |
382 | 397 | | |
383 | 398 | | |
| 399 | + | |
384 | 400 | | |
385 | | - | |
386 | | - | |
387 | | - | |
| 401 | + | |
388 | 402 | | |
389 | 403 | | |
390 | 404 | | |
| |||
408 | 422 | | |
409 | 423 | | |
410 | 424 | | |
| 425 | + | |
411 | 426 | | |
412 | | - | |
413 | | - | |
414 | | - | |
| 427 | + | |
415 | 428 | | |
416 | 429 | | |
417 | 430 | | |
| |||
464 | 477 | | |
465 | 478 | | |
466 | 479 | | |
467 | | - | |
| 480 | + | |
468 | 481 | | |
469 | 482 | | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
| 483 | + | |
474 | 484 | | |
475 | 485 | | |
476 | 486 | | |
| |||
488 | 498 | | |
489 | 499 | | |
490 | 500 | | |
| 501 | + | |
| 502 | + | |
491 | 503 | | |
492 | 504 | | |
493 | | - | |
494 | | - | |
495 | | - | |
| 505 | + | |
496 | 506 | | |
497 | 507 | | |
498 | 508 | | |
| |||
516 | 526 | | |
517 | 527 | | |
518 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
519 | 553 | | |
520 | 554 | | |
521 | 555 | | |
| |||
537 | 571 | | |
538 | 572 | | |
539 | 573 | | |
| 574 | + | |
540 | 575 | | |
541 | | - | |
| 576 | + | |
542 | 577 | | |
543 | 578 | | |
544 | 579 | | |
| |||
799 | 834 | | |
800 | 835 | | |
801 | 836 | | |
802 | | - | |
803 | | - | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
804 | 856 | | |
805 | 857 | | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
806 | 889 | | |
807 | 890 | | |
808 | 891 | | |
| |||
0 commit comments