@equinor/fusion-framework-module-msal 3.1.0 → 3.1.2
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/CHANGELOG.md +116 -57
- package/dist/esm/client/behavior.js +3 -0
- package/dist/esm/client/behavior.js.map +1 -1
- package/dist/esm/client/client.js +68 -0
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/client/create-auth-client.js +20 -0
- package/dist/esm/client/create-auth-client.js.map +1 -1
- package/dist/esm/client/log/console.js +15 -0
- package/dist/esm/client/log/console.js.map +1 -1
- package/dist/esm/client/util/browser.js +10 -0
- package/dist/esm/client/util/browser.js.map +1 -1
- package/dist/esm/client/util/url.js +14 -0
- package/dist/esm/client/util/url.js.map +1 -1
- package/dist/esm/configurator.js +1 -0
- package/dist/esm/configurator.js.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/module.js +19 -0
- package/dist/esm/module.js.map +1 -1
- package/dist/esm/provider.js +1 -0
- package/dist/esm/provider.js.map +1 -1
- package/dist/esm/version.js +2 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/client/behavior.d.ts +11 -0
- package/dist/types/client/client.d.ts +68 -0
- package/dist/types/client/create-auth-client.d.ts +21 -1
- package/dist/types/client/log/console.d.ts +18 -0
- package/dist/types/client/request.d.ts +63 -0
- package/dist/types/configurator.d.ts +17 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/module.d.ts +17 -0
- package/dist/types/provider.d.ts +21 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,88 +1,147 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2333](https://github.com/equinor/fusion-framework/pull/2333) [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1) Thanks [@odinr](https://github.com/odinr)! - Updated `TypeScript` to 5.5.3
|
|
8
|
+
|
|
9
|
+
- [#2320](https://github.com/equinor/fusion-framework/pull/2320) [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee) Thanks [@odinr](https://github.com/odinr)! - Removed the `removeComments` option from the `tsconfig.base.json` file.
|
|
10
|
+
|
|
11
|
+
Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
|
|
12
|
+
|
|
13
|
+
1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
|
|
14
|
+
2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
|
|
15
|
+
3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
|
|
16
|
+
|
|
17
|
+
No action is required from consumers of the library. This change affects the build process and doesn't introduce any breaking changes or new features.
|
|
18
|
+
|
|
19
|
+
Before:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"compilerOptions": {
|
|
24
|
+
"module": "ES2022",
|
|
25
|
+
"target": "ES6",
|
|
26
|
+
"incremental": true,
|
|
27
|
+
"removeComments": true,
|
|
28
|
+
"preserveConstEnums": true,
|
|
29
|
+
"sourceMap": true,
|
|
30
|
+
"moduleResolution": "node"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
After:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"compilerOptions": {
|
|
40
|
+
"module": "ES2022",
|
|
41
|
+
"target": "ES6",
|
|
42
|
+
"incremental": true,
|
|
43
|
+
"preserveConstEnums": true,
|
|
44
|
+
"sourceMap": true,
|
|
45
|
+
"moduleResolution": "node"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [[`2f74edc`](https://github.com/equinor/fusion-framework/commit/2f74edcd4a3ea2b87d69f0fd63492145c3c01663), [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1), [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee)]:
|
|
53
|
+
- @equinor/fusion-framework-module@4.3.2
|
|
54
|
+
|
|
55
|
+
## 3.1.1
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- Updated dependencies [[`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2)]:
|
|
60
|
+
- @equinor/fusion-framework-module@4.3.1
|
|
61
|
+
|
|
3
62
|
## 3.1.0
|
|
4
63
|
|
|
5
64
|
### Minor Changes
|
|
6
65
|
|
|
7
|
-
-
|
|
66
|
+
- [#1953](https://github.com/equinor/fusion-framework/pull/1953) [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904) Thanks [@odinr](https://github.com/odinr)! - updated typescript to 5.4.2
|
|
8
67
|
|
|
9
68
|
### Patch Changes
|
|
10
69
|
|
|
11
|
-
-
|
|
12
|
-
|
|
70
|
+
- Updated dependencies [[`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904), [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904)]:
|
|
71
|
+
- @equinor/fusion-framework-module@4.3.0
|
|
13
72
|
|
|
14
73
|
## 3.0.10
|
|
15
74
|
|
|
16
75
|
### Patch Changes
|
|
17
76
|
|
|
18
|
-
-
|
|
19
|
-
|
|
77
|
+
- Updated dependencies [[`152cf73`](https://github.com/equinor/fusion-framework/commit/152cf73d39eb32ccbaddaa6941e315c437c4972d)]:
|
|
78
|
+
- @equinor/fusion-framework-module@4.2.7
|
|
20
79
|
|
|
21
80
|
## 3.0.9
|
|
22
81
|
|
|
23
82
|
### Patch Changes
|
|
24
83
|
|
|
25
|
-
-
|
|
84
|
+
- [#1646](https://github.com/equinor/fusion-framework/pull/1646) [`5eab8af`](https://github.com/equinor/fusion-framework/commit/5eab8afe3c3106cc67ad14ce4cbee6c7e4e8dfb1) Thanks [@odinr](https://github.com/odinr)! - re-export `AuthenticationResult` from `@azure/msal-browser`
|
|
26
85
|
|
|
27
86
|
## 3.0.8
|
|
28
87
|
|
|
29
88
|
### Patch Changes
|
|
30
89
|
|
|
31
|
-
-
|
|
90
|
+
- [#1595](https://github.com/equinor/fusion-framework/pull/1595) [`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125) Thanks [@Gustav-Eikaas](https://github.com/Gustav-Eikaas)! - support for module resolution NodeNext & Bundler
|
|
32
91
|
|
|
33
|
-
-
|
|
34
|
-
|
|
92
|
+
- Updated dependencies [[`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125)]:
|
|
93
|
+
- @equinor/fusion-framework-module@4.2.6
|
|
35
94
|
|
|
36
95
|
## 3.0.7
|
|
37
96
|
|
|
38
97
|
### Patch Changes
|
|
39
98
|
|
|
40
|
-
-
|
|
99
|
+
- [`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc) Thanks [@odinr](https://github.com/odinr)! - force patch bump, realign missing snapshot
|
|
41
100
|
|
|
42
|
-
-
|
|
43
|
-
|
|
101
|
+
- Updated dependencies [[`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc)]:
|
|
102
|
+
- @equinor/fusion-framework-module@4.2.5
|
|
44
103
|
|
|
45
104
|
## 3.0.6
|
|
46
105
|
|
|
47
106
|
### Patch Changes
|
|
48
107
|
|
|
49
|
-
-
|
|
50
|
-
|
|
108
|
+
- Updated dependencies [[`9076a498`](https://github.com/equinor/fusion-framework/commit/9076a49876e7a414a27557b7fb9095a67fe3a57f)]:
|
|
109
|
+
- @equinor/fusion-framework-module@4.2.4
|
|
51
110
|
|
|
52
111
|
## 3.0.5
|
|
53
112
|
|
|
54
113
|
### Patch Changes
|
|
55
114
|
|
|
56
|
-
-
|
|
115
|
+
- [#1109](https://github.com/equinor/fusion-framework/pull/1109) [`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862) Thanks [@odinr](https://github.com/odinr)! - Change packaged manager from yarn to pnpm
|
|
57
116
|
|
|
58
|
-
|
|
117
|
+
conflicts of `@types/react` made random outcomes when using `yarn`
|
|
59
118
|
|
|
60
|
-
|
|
119
|
+
this change should not affect consumer of the packages, but might conflict dependent on local package manager.
|
|
61
120
|
|
|
62
|
-
-
|
|
63
|
-
|
|
121
|
+
- Updated dependencies [[`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862), [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272)]:
|
|
122
|
+
- @equinor/fusion-framework-module@4.2.3
|
|
64
123
|
|
|
65
124
|
## 3.0.4
|
|
66
125
|
|
|
67
126
|
### Patch Changes
|
|
68
127
|
|
|
69
|
-
-
|
|
128
|
+
- [#946](https://github.com/equinor/fusion-framework/pull/946) [`5a160d88`](https://github.com/equinor/fusion-framework/commit/5a160d88981ddfe861d391cfefe10f54dda3d352) Thanks [@odinr](https://github.com/odinr)! - Build/update typescript to 5
|
|
70
129
|
|
|
71
|
-
-
|
|
72
|
-
|
|
130
|
+
- Updated dependencies [[`5a160d88`](https://github.com/equinor/fusion-framework/commit/5a160d88981ddfe861d391cfefe10f54dda3d352)]:
|
|
131
|
+
- @equinor/fusion-framework-module@4.2.1
|
|
73
132
|
|
|
74
133
|
## 3.0.3
|
|
75
134
|
|
|
76
135
|
### Patch Changes
|
|
77
136
|
|
|
78
|
-
-
|
|
137
|
+
- [#905](https://github.com/equinor/fusion-framework/pull/905) [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c) Thanks [@odinr](https://github.com/odinr)! - **🚧 Chore: dedupe packages**
|
|
79
138
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
139
|
+
- align all versions of typescript
|
|
140
|
+
- update types to build
|
|
141
|
+
- a couple of typecasts did not [satisfies](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#satisfies-support-in-jsdoc) and was recasted as `unknwon`, marked with `TODO`, should be fixed in future
|
|
83
142
|
|
|
84
|
-
-
|
|
85
|
-
|
|
143
|
+
- Updated dependencies [[`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`76b30c1e`](https://github.com/equinor/fusion-framework/commit/76b30c1e86db3db18adbe759bb1e39885de1c898), [`83ee5abf`](https://github.com/equinor/fusion-framework/commit/83ee5abf7bcab193c85980e5ae44895cd7f6f08d), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`060818eb`](https://github.com/equinor/fusion-framework/commit/060818eb04ebb9ed6deaed1f0b4530201b1181cf), [`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c)]:
|
|
144
|
+
- @equinor/fusion-framework-module@4.2.0
|
|
86
145
|
|
|
87
146
|
All notable changes to this project will be documented in this file.
|
|
88
147
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
@@ -131,13 +190,13 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
131
190
|
|
|
132
191
|
### Bug Fixes
|
|
133
192
|
|
|
134
|
-
-
|
|
193
|
+
- **module-msal:** await redirect handling ([92686d2](https://github.com/equinor/fusion-framework/commit/92686d2ae054d7f507093b839edb2fe5775c7449))
|
|
135
194
|
|
|
136
195
|
## 1.0.18 (2022-11-11)
|
|
137
196
|
|
|
138
197
|
### Bug Fixes
|
|
139
198
|
|
|
140
|
-
-
|
|
199
|
+
- **module-auth:** make http module await auth ([18a0ed9](https://github.com/equinor/fusion-framework/commit/18a0ed947e128bf1cdc86aa45d31e73c1f8c4bbb))
|
|
141
200
|
|
|
142
201
|
## 1.0.17 (2022-11-03)
|
|
143
202
|
|
|
@@ -179,7 +238,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
179
238
|
|
|
180
239
|
### Bug Fixes
|
|
181
240
|
|
|
182
|
-
-
|
|
241
|
+
- update registering of configuration ([20942ce](https://github.com/equinor/fusion-framework/commit/20942ce1c7a853ea3b55c031a242646e378db8c9))
|
|
183
242
|
|
|
184
243
|
## 1.0.7 (2022-09-20)
|
|
185
244
|
|
|
@@ -221,21 +280,21 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
221
280
|
|
|
222
281
|
### Features
|
|
223
282
|
|
|
224
|
-
-
|
|
283
|
+
- **module-msal:** expose simple config ([596c4c2](https://github.com/equinor/fusion-framework/commit/596c4c222a75bfef67e2e129792f6132cbceb47c))
|
|
225
284
|
|
|
226
285
|
### Bug Fixes
|
|
227
286
|
|
|
228
|
-
-
|
|
287
|
+
- **module-msal:** set default logging to errors ([1b53be8](https://github.com/equinor/fusion-framework/commit/1b53be816600c838257f0b3c6f3a338466938a3f))
|
|
229
288
|
|
|
230
289
|
## [1.0.0-alpha.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.4.2...@equinor/fusion-framework-module-msal@1.0.0-alpha.0) (2022-09-12)
|
|
231
290
|
|
|
232
291
|
### Features
|
|
233
292
|
|
|
234
|
-
-
|
|
293
|
+
- **module-msal:** expose simple config ([596c4c2](https://github.com/equinor/fusion-framework/commit/596c4c222a75bfef67e2e129792f6132cbceb47c))
|
|
235
294
|
|
|
236
295
|
### Bug Fixes
|
|
237
296
|
|
|
238
|
-
-
|
|
297
|
+
- **module-msal:** set default logging to errors ([1b53be8](https://github.com/equinor/fusion-framework/commit/1b53be816600c838257f0b3c6f3a338466938a3f))
|
|
239
298
|
|
|
240
299
|
## 0.4.2 (2022-09-05)
|
|
241
300
|
|
|
@@ -249,23 +308,23 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
249
308
|
|
|
250
309
|
### ⚠ BREAKING CHANGES
|
|
251
310
|
|
|
252
|
-
-
|
|
311
|
+
- rename fetch
|
|
253
312
|
|
|
254
|
-
-
|
|
313
|
+
- fix(module-service-discovery): update http client consumer
|
|
255
314
|
|
|
256
|
-
-
|
|
315
|
+
- build: update allowed branches
|
|
257
316
|
|
|
258
|
-
-
|
|
317
|
+
- build: add conventional commit
|
|
259
318
|
|
|
260
|
-
-
|
|
319
|
+
- build: use conventionalcommits
|
|
261
320
|
|
|
262
|
-
-
|
|
321
|
+
- build(module-http): push major
|
|
263
322
|
|
|
264
|
-
-
|
|
323
|
+
- build: update deps
|
|
265
324
|
|
|
266
325
|
### Features
|
|
267
326
|
|
|
268
|
-
-
|
|
327
|
+
- rename fetch method ([#226](https://github.com/equinor/fusion-framework/issues/226)) ([f02df7c](https://github.com/equinor/fusion-framework/commit/f02df7cdd2b9098b0da49c5ea56ac3b6a17e9e32))
|
|
269
328
|
|
|
270
329
|
## 0.3.2 (2022-08-19)
|
|
271
330
|
|
|
@@ -277,17 +336,17 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
277
336
|
|
|
278
337
|
# [0.3.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.2.0...@equinor/fusion-framework-module-msal@0.3.0) (2022-08-11)
|
|
279
338
|
|
|
280
|
-
-
|
|
339
|
+
- feat!: allow modules to displose ([32b69fb](https://github.com/equinor/fusion-framework/commit/32b69fb7cc61e78e503e67d0e77f21fb44b600b9))
|
|
281
340
|
|
|
282
341
|
### BREAKING CHANGES
|
|
283
342
|
|
|
284
|
-
-
|
|
343
|
+
- module.initialize now has object as arg
|
|
285
344
|
|
|
286
345
|
# 0.2.0 (2022-08-08)
|
|
287
346
|
|
|
288
347
|
### Features
|
|
289
348
|
|
|
290
|
-
-
|
|
349
|
+
- **module-service-discovery:** resolve service to config ([3fa088d](https://github.com/equinor/fusion-framework/commit/3fa088d2ced8136447df6949928f1af9fc83407a))
|
|
291
350
|
|
|
292
351
|
## [0.1.24](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.23...@equinor/fusion-framework-module-msal@0.1.24) (2022-08-04)
|
|
293
352
|
|
|
@@ -301,7 +360,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
301
360
|
|
|
302
361
|
### Bug Fixes
|
|
303
362
|
|
|
304
|
-
-
|
|
363
|
+
- change typo of exports ([b049503](https://github.com/equinor/fusion-framework/commit/b049503511fb1b37b920b00aed1468ed8385a67e))
|
|
305
364
|
|
|
306
365
|
## [0.1.21](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.20...@equinor/fusion-framework-module-msal@0.1.21) (2022-07-01)
|
|
307
366
|
|
|
@@ -355,31 +414,31 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
355
414
|
|
|
356
415
|
### Bug Fixes
|
|
357
416
|
|
|
358
|
-
-
|
|
417
|
+
- **module-msal:** prevent redirect loop ([2d0f57c](https://github.com/equinor/fusion-framework/commit/2d0f57c737282f485099ff2562b4c4c956f8e30a))
|
|
359
418
|
|
|
360
419
|
## 0.1.8 (2022-03-25)
|
|
361
420
|
|
|
362
421
|
### Bug Fixes
|
|
363
422
|
|
|
364
|
-
-
|
|
423
|
+
- **modules-msal:** change regex group selector ([ebaa118](https://github.com/equinor/fusion-framework/commit/ebaa11849303e68f67544f8db57727673f821744))
|
|
365
424
|
|
|
366
425
|
## [0.1.7](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.6...@equinor/fusion-framework-module-msal@0.1.7) (2022-02-23)
|
|
367
426
|
|
|
368
427
|
### Bug Fixes
|
|
369
428
|
|
|
370
|
-
-
|
|
429
|
+
- **module-msal:** await auth ([#33](https://github.com/equinor/fusion-framework/issues/33)) ([d4c3dbd](https://github.com/equinor/fusion-framework/commit/d4c3dbd0afc6a3adebe23853ccd363d1bf37f131))
|
|
371
430
|
|
|
372
431
|
## [0.1.6](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.5...@equinor/fusion-framework-module-msal@0.1.6) (2022-02-23)
|
|
373
432
|
|
|
374
433
|
### Bug Fixes
|
|
375
434
|
|
|
376
|
-
-
|
|
435
|
+
- deps ([2f2938b](https://github.com/equinor/fusion-framework/commit/2f2938b554610a068ed451623dd13480cae27302))
|
|
377
436
|
|
|
378
437
|
## [0.1.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.4...@equinor/fusion-framework-module-msal@0.1.5) (2022-02-23)
|
|
379
438
|
|
|
380
439
|
### Bug Fixes
|
|
381
440
|
|
|
382
|
-
-
|
|
441
|
+
- add missing deps ([d689a02](https://github.com/equinor/fusion-framework/commit/d689a025613401eadf693bdd52694ba462dcfea3))
|
|
383
442
|
|
|
384
443
|
## [0.1.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-msal@0.1.3...@equinor/fusion-framework-module-msal@0.1.4) (2022-02-23)
|
|
385
444
|
|
|
@@ -393,7 +452,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
393
452
|
|
|
394
453
|
### Bug Fixes
|
|
395
454
|
|
|
396
|
-
-
|
|
455
|
+
- **module-msal:** auth client id check ([#27](https://github.com/equinor/fusion-framework/issues/27)) ([907460e](https://github.com/equinor/fusion-framework/commit/907460e3e63e777f6766dcc044cad7078d7ab747))
|
|
397
456
|
|
|
398
457
|
## 0.1.1 (2022-02-09)
|
|
399
458
|
|
|
@@ -403,10 +462,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
403
462
|
|
|
404
463
|
### Bug Fixes
|
|
405
464
|
|
|
406
|
-
-
|
|
465
|
+
- **module-msal:** invert bool check of scopes ([3d9fb50](https://github.com/equinor/fusion-framework/commit/3d9fb50e4b3d408cab4f6e68c44ca9045e8ce40d))
|
|
407
466
|
|
|
408
467
|
### Features
|
|
409
468
|
|
|
410
|
-
-
|
|
411
|
-
-
|
|
412
|
-
-
|
|
469
|
+
- add client for msal ([41e6b13](https://github.com/equinor/fusion-framework/commit/41e6b1378f41b1e03023186d480460a0189878c6))
|
|
470
|
+
- **module-msal:** change behavoir to redirect ([9f2193f](https://github.com/equinor/fusion-framework/commit/9f2193f21a7056cb6b42513845fdc19910522628))
|
|
471
|
+
- **module-msal:** expose account ([f4b27b3](https://github.com/equinor/fusion-framework/commit/f4b27b3db7cf5133afbaf366ba953561dd23c113))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior.js","sourceRoot":"","sources":["../../../src/client/behavior.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"behavior.js","sourceRoot":"","sources":["../../../src/client/behavior.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB,UAAU,CAAC"}
|
|
@@ -9,7 +9,43 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { PublicClientApplication, } from '@azure/msal-browser';
|
|
11
11
|
import { defaultBehavior } from './behavior';
|
|
12
|
+
/**
|
|
13
|
+
* ### Simple extension of Microsoft`s authentication client.
|
|
14
|
+
*
|
|
15
|
+
* When using this client tenant is **required** since common login is deprecated after all.
|
|
16
|
+
* By providing tenant the user account can simple be extracted from current session *if any*.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const tenantId = '224123a0d-7990-4ba1-aff3-1dss9569af32';
|
|
21
|
+
* const authPath = '/my-app/auth';
|
|
22
|
+
* const client = new AuthClient(tenantId, {
|
|
23
|
+
* auth: {
|
|
24
|
+
* clientId: '6dab35d4-59ff-4dcc-3356-24479e6fc888',
|
|
25
|
+
* authority: `https://login.microsoftonline.com/${tenantId}`,
|
|
26
|
+
* redirectUri: window.location.origin + '/my-app/auth'
|
|
27
|
+
* }
|
|
28
|
+
* });
|
|
29
|
+
* document.getElementById('login-btn').addEventListener('click', () =>
|
|
30
|
+
* client.login({ scopes: ['data.read'] })
|
|
31
|
+
* .then(console.log)
|
|
32
|
+
* .catch(console.error)
|
|
33
|
+
* );
|
|
34
|
+
* (async() => {
|
|
35
|
+
* if(window.location.path === authPath) {
|
|
36
|
+
* await client.handleRedirectPromise()
|
|
37
|
+
* }
|
|
38
|
+
* )();
|
|
39
|
+
* ```
|
|
40
|
+
* @see [Microsoft Authentication Library](https://github.com/AzureAD/microsoft-authentication-library-for-js)
|
|
41
|
+
* @see [Microsoft identity platform](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow)
|
|
42
|
+
*/
|
|
12
43
|
export class AuthClient extends PublicClientApplication {
|
|
44
|
+
/**
|
|
45
|
+
* @returns
|
|
46
|
+
* Returns account for client tenant that MSAL currently has data for.
|
|
47
|
+
* (the account object is created at the time of successful login)
|
|
48
|
+
*/
|
|
13
49
|
get account() {
|
|
14
50
|
const accounts = this.getAllAccounts();
|
|
15
51
|
const account = accounts.find((a) => { var _a; return ((_a = a.idTokenClaims) === null || _a === void 0 ? void 0 : _a.aud) === this.clientId; });
|
|
@@ -24,6 +60,9 @@ export class AuthClient extends PublicClientApplication {
|
|
|
24
60
|
}
|
|
25
61
|
return false;
|
|
26
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* @returns - Configured client id
|
|
65
|
+
*/
|
|
27
66
|
get clientId() {
|
|
28
67
|
var _a;
|
|
29
68
|
return (_a = this.config.auth) === null || _a === void 0 ? void 0 : _a.clientId;
|
|
@@ -31,10 +70,25 @@ export class AuthClient extends PublicClientApplication {
|
|
|
31
70
|
get requestOrigin() {
|
|
32
71
|
return this.browserStorage.getTemporaryCache('request.origin', true);
|
|
33
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* @param tenantId - tenant id for client domain
|
|
75
|
+
* @param config - required [Configuration](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/src/config/Configuration.ts)
|
|
76
|
+
*/
|
|
34
77
|
constructor(tenantId, config) {
|
|
35
78
|
super(config);
|
|
36
79
|
this.tenantId = tenantId;
|
|
37
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* @param silent
|
|
83
|
+
* Attempt to use a hidden iframe to fetch an authorization code from the eSTS if {@link AuthClient.account} or login hint.
|
|
84
|
+
* Provided {@link AuthBehavior} is used as fallback.
|
|
85
|
+
* There are cases where this may not work:
|
|
86
|
+
* - Any browser using a form of Intelligent Tracking Prevention
|
|
87
|
+
* - If there is not an established session with the service
|
|
88
|
+
*
|
|
89
|
+
* @returns
|
|
90
|
+
* Promise that is fulfilled when this function has completed, or rejected if an error was raised.
|
|
91
|
+
*/
|
|
38
92
|
login(options_1) {
|
|
39
93
|
return __awaiter(this, arguments, void 0, function* (options, behavior = defaultBehavior, silent = true) {
|
|
40
94
|
var _a;
|
|
@@ -61,6 +115,20 @@ export class AuthClient extends PublicClientApplication {
|
|
|
61
115
|
}
|
|
62
116
|
});
|
|
63
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Will try to silently acquire an access token for a given set of scopes.
|
|
120
|
+
* Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.
|
|
121
|
+
*
|
|
122
|
+
* @param silent
|
|
123
|
+
* Attempt to use a hidden iframe to fetch an authorization code from the eSTS if {@link AuthClient.account} or login hint.
|
|
124
|
+
* Provided {@link AuthBehavior} is used as fallback.
|
|
125
|
+
* There are cases where this may not work:
|
|
126
|
+
* - Any browser using a form of Intelligent Tracking Prevention
|
|
127
|
+
* - If there is not an established session with the service
|
|
128
|
+
*
|
|
129
|
+
* @returns
|
|
130
|
+
* Promise that is fulfilled when this function has completed, or rejected if an error was raised.
|
|
131
|
+
*/
|
|
64
132
|
acquireToken() {
|
|
65
133
|
return __awaiter(this, arguments, void 0, function* (options = { scopes: [] }, behavior = defaultBehavior, silent = true) {
|
|
66
134
|
const account = yield this.account;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/client/client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACH,uBAAuB,GAO1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAgB,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/client/client.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { AuthClient } from './client';
|
|
2
2
|
import { normalizeUri } from './util/url';
|
|
3
|
+
/**
|
|
4
|
+
* Creates an authentication client with basic config.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const myClient = createClient(
|
|
9
|
+
* '224123a0d-7990-4ba1-aff3-1dss9569af32',
|
|
10
|
+
* '6dab35d4-59ff-4dcc-3356-24479e6fc888',
|
|
11
|
+
* '/my-app/auth'
|
|
12
|
+
* );
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @template T - client type, default to {@link AuthClient}
|
|
16
|
+
*
|
|
17
|
+
* @param tenantId - tenant to for authentication
|
|
18
|
+
* @param clientId - client id for authentication
|
|
19
|
+
* @param redirectUri - callback url for authentication (must match exact configured url in app)
|
|
20
|
+
* @param config - optional [Configuration](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/src/config/Configuration.ts)
|
|
21
|
+
* @param ctor - optional client class
|
|
22
|
+
*/
|
|
3
23
|
export const createAuthClient = (tenantId, clientId, redirectUri, config, ctor) => {
|
|
4
24
|
const auth = Object.assign({ clientId, redirectUri: normalizeUri(redirectUri || ''), navigateToLoginRequestUrl: false, authority: `https://login.microsoftonline.com/${tenantId}` }, config === null || config === void 0 ? void 0 : config.auth);
|
|
5
25
|
const cache = Object.assign({ cacheLocation: 'localStorage' }, config === null || config === void 0 ? void 0 : config.cache);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-auth-client.js","sourceRoot":"","sources":["../../../src/client/create-auth-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"create-auth-client.js","sourceRoot":"","sources":["../../../src/client/create-auth-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,QAAgB,EAChB,QAAgB,EAChB,WAAoB,EACpB,MAAyB,EACzB,IAAyD,EACxD,EAAE;IACH,MAAM,IAAI,mBACN,QAAQ,EACR,WAAW,EAAE,YAAY,CAAC,WAAW,IAAI,EAAE,CAAC,EAC5C,yBAAyB,EAAE,KAAK,EAChC,SAAS,EAAE,qCAAqC,QAAQ,EAAE,IACvD,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAClB,CAAC;IACF,MAAM,KAAK,mBAAK,aAAa,EAAE,cAAc,IAAK,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAE,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAC;IAC9B,OAAO,IAAI,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAM,CAAC;AAC5E,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { Logger, LogLevel } from '@azure/msal-browser';
|
|
2
|
+
/**
|
|
3
|
+
* MSAL client logger for development, production should use telemetry
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* client.setLogger(new ConsoleLogger());
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
2
10
|
export class ConsoleLogger extends Logger {
|
|
11
|
+
/**
|
|
12
|
+
* @param logLevel - 0-1-2-3 (error-warning-info-debug) if not provided all records logged
|
|
13
|
+
*/
|
|
3
14
|
constructor(logLevel) {
|
|
4
15
|
super({
|
|
5
16
|
logLevel,
|
|
6
17
|
loggerCallback: (...args) => this.loggerCallback(...args),
|
|
7
18
|
});
|
|
19
|
+
/**
|
|
20
|
+
* Map log level to console log function type
|
|
21
|
+
*/
|
|
8
22
|
this.getLogType = (lvl) => {
|
|
9
23
|
switch (lvl) {
|
|
10
24
|
case LogLevel.Error:
|
|
@@ -19,6 +33,7 @@ export class ConsoleLogger extends Logger {
|
|
|
19
33
|
}
|
|
20
34
|
};
|
|
21
35
|
}
|
|
36
|
+
/** @inheritdoc */
|
|
22
37
|
loggerCallback(lvl, msg, _containsPii) {
|
|
23
38
|
console[this.getLogType(lvl)](`%c FUSION::MSAL %c %s`, 'border: 1px solid;', 'border: none;', msg);
|
|
24
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../../../src/client/log/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"","sources":["../../../../src/client/log/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAOvD;;;;;;;GAOG;AACH,MAAM,OAAO,aAAc,SAAQ,MAAM;IACrC;;OAEG;IACH,YAAY,QAAmB;QAC3B,KAAK,CAAC;YACF,QAAQ;YACR,cAAc,EAAE,CAAC,GAAG,IAAiC,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;SACzF,CAAC,CAAC;QAaP;;WAEG;QACO,eAAU,GAAG,CAAC,GAAa,EAAgB,EAAE;YACnD,QAAQ,GAAG,EAAE,CAAC;gBACV,KAAK,QAAQ,CAAC,KAAK;oBACf,OAAO,OAAO,CAAC;gBACnB,KAAK,QAAQ,CAAC,OAAO;oBACjB,OAAO,MAAM,CAAC;gBAClB,KAAK,QAAQ,CAAC,IAAI;oBACd,OAAO,MAAM,CAAC;gBAClB,KAAK,QAAQ,CAAC,OAAO,CAAC;gBACtB;oBACI,OAAO,OAAO,CAAC;YACvB,CAAC;QACL,CAAC,CAAC;IA3BF,CAAC;IAED,kBAAkB;IACR,cAAc,CAAC,GAAa,EAAE,GAAW,EAAE,YAAsB;QACvE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CACzB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,GAAG,CACN,CAAC;IACN,CAAC;CAkBJ;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redirects browser to provided location
|
|
3
|
+
* If not redirected by provided timeout, promise is rejected
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*
|
|
7
|
+
* @param url - endpoint to navigate to
|
|
8
|
+
* @param timeout - max wait before redirect
|
|
9
|
+
* @param history - append navigation to history
|
|
10
|
+
*/
|
|
1
11
|
export const redirect = (url, timeout = 3000, history) => {
|
|
2
12
|
history ? window.location.assign(url) : window.location.replace(url);
|
|
3
13
|
return new Promise((_, reject) => setTimeout(reject, timeout));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../../src/client/util/browser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../../src/client/util/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,OAAO,GAAG,IAAI,EAAE,OAAiB,EAAiB,EAAE;IACtF,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrE,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACnE,CAAC,CAAC"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates and normalizes redirect uri.
|
|
3
|
+
* Strips double and trailing slashes
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*
|
|
7
|
+
* @param uri - relative path or full url
|
|
8
|
+
* @param home - base url for relative urls
|
|
9
|
+
*/
|
|
1
10
|
export const normalizeUri = (uri, home = window.location.origin) => {
|
|
2
11
|
uri = uri.match(/^http[s]?/) ? uri : home + uri;
|
|
3
12
|
const { origin, pathname } = new URL(uri);
|
|
4
13
|
return origin + pathname.replace(/([^:]\/)\/+/g, '$1');
|
|
5
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Compares normalized version of urls
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
6
20
|
export const compareOrigin = (a, b) => {
|
|
7
21
|
const url = { a: normalizeUri(a), b: normalizeUri(b) };
|
|
8
22
|
return url.a === url.b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../../src/client/util/url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../../src/client/util/url.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,OAAe,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAU,EAAE;IACvF,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC;IAChD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAS,EAAE,CAAS,EAAW,EAAE;IAC3D,MAAM,GAAG,GAAG,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACvD,OAAO,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC"}
|
package/dist/esm/configurator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurator.js","sourceRoot":"","sources":["../../src/configurator.ts"],"names":[],"mappings":"AASA,MAAM,kBAAkB,GAAG,SAAS,CAAC;AA8BrC,MAAM,OAAO,gBAAgB;IAA7B;
|
|
1
|
+
{"version":3,"file":"configurator.js","sourceRoot":"","sources":["../../src/configurator.ts"],"names":[],"mappings":"AASA,MAAM,kBAAkB,GAAG,SAAS,CAAC;AA8BrC,MAAM,OAAO,gBAAgB;IAA7B;QACI,oCAAoC;QAC1B,aAAQ,GAAsC,EAAE,CAAC;QAC3D,iBAAY,GAAG,IAAI,CAAC;IAqBxB,CAAC;IAnBG,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAC7C,CAAC;IAED,eAAe,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,eAAe,CAAC,IAAY,EAAE,OAA0B;QACpD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gBAAgB,CAAC,OAA0B;QACvC,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACpC,MAAM,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACvD,CAAC;QACD,IAAI,CAAC,eAAe,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;CACJ"}
|