Commit 5436d08
Allow validateSession to return a promise instead of an immediate value (#36)
* Allow promise like object/function to be provided as validateSession function
Extracted code that would become duplicated since the promise addition
* Handle promised validateSession return value the same as if it was a function that would return an immediate value.
* Fixed lint issues
* Added tests for validateSession function
* Fixed readme to specify that the validateSession can be a function that returns a promise.
* Added code example for a validateSession that returns a promise.1 parent 3239a19 commit 5436d08
File tree
5 files changed
+1532
-1428
lines changed- src
- __tests__
5 files changed
+1532
-1428
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
0 commit comments