@muze-nl/metro-oidc 0.3.2 → 0.3.4
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/README.md +15 -2
- package/dist/browser.js +345 -410
- package/dist/browser.js.map +4 -4
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +4 -4
- package/package.json +3 -3
- package/src/oidcmw.mjs +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muze-nl/metro-oidc",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "oidc client middleware for @muze-nl/metro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@muze-nl/assert": "^0.3.3",
|
|
51
|
-
"@muze-nl/metro": "^0.6.
|
|
52
|
-
"@muze-nl/metro-oauth2": "^0.5.
|
|
51
|
+
"@muze-nl/metro": "^0.6.5",
|
|
52
|
+
"@muze-nl/metro-oauth2": "^0.5.4"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/src/oidcmw.mjs
CHANGED
|
@@ -148,9 +148,11 @@ export function isRedirected() {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
export function idToken(options) {
|
|
151
|
+
if (!options.store) {
|
|
152
|
+
if (!options.issuer) {
|
|
153
|
+
throw metro.metroError('Must supply options.issuer or options.store to get the id_token')
|
|
154
|
+
}
|
|
155
|
+
options.store = oidcStore(options.issuer)
|
|
156
|
+
}
|
|
151
157
|
return options.store.get('id_token')
|
|
152
158
|
}
|
|
153
|
-
|
|
154
|
-
export async function authorizePopup(authorizationCodeURL) {
|
|
155
|
-
return oauth2.authorizePopup(authorizationCodeURL)
|
|
156
|
-
}
|