@flink-app/oidc-plugin 2.0.0-alpha.86 → 2.0.0-alpha.88
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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @flink-app/oidc-plugin
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.88
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5f3919e: fix(oidc-plugin): use discovered userinfo endpoint in buildProfile when no manual endpoint is configured
|
|
8
|
+
- @flink-app/flink@2.0.0-alpha.88
|
|
9
|
+
- @flink-app/jwt-auth-plugin@2.0.0-alpha.88
|
|
10
|
+
|
|
11
|
+
## 2.0.0-alpha.87
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @flink-app/flink@2.0.0-alpha.87
|
|
17
|
+
- @flink-app/jwt-auth-plugin@2.0.0-alpha.87
|
|
18
|
+
|
|
3
19
|
## 2.0.0-alpha.86
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OidcProvider.d.ts","sourceRoot":"","sources":["../../src/providers/OidcProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,YAAY,MAAM,yBAAyB,CAAC;AAKnD;;;;;;;;;;GAUG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,WAAW,CAAkB;gBAEzB,MAAM,EAAE,kBAAkB;IAItC;;;;;;;OAOG;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,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAiB1G;;;;;;;OAOG;IACG,oBAAoB,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAqC/H;;;;;;;;OAQG;IACG,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAajE;;;;;;;;;OASG;IACG,YAAY,CAAC,QAAQ,EAAE,YAAY,EAAE,eAAe,GAAE,OAAc,GAAG,OAAO,CAAC,WAAW,CAAC;IA8BjG;;;;OAIG;YACW,iBAAiB;IAU/B;;;;OAIG;IACH,iBAAiB,IAAI,GAAG;CAM3B"}
|
|
@@ -173,7 +173,9 @@ class OidcProvider {
|
|
|
173
173
|
async buildProfile(tokenSet, includeUserInfo = true) {
|
|
174
174
|
let claims = { ...tokenSet.claims };
|
|
175
175
|
// Optionally fetch additional claims from UserInfo endpoint
|
|
176
|
-
|
|
176
|
+
// Check both manual config and discovered endpoint (via OIDC discovery)
|
|
177
|
+
const userinfoUrl = this.config.userinfoEndpoint || this.issuer?.metadata?.userinfo_endpoint;
|
|
178
|
+
if (includeUserInfo && userinfoUrl) {
|
|
177
179
|
try {
|
|
178
180
|
const userinfo = await this.getUserInfo(tokenSet.accessToken);
|
|
179
181
|
// Merge UserInfo claims with ID token claims
|
|
@@ -181,7 +183,7 @@ class OidcProvider {
|
|
|
181
183
|
}
|
|
182
184
|
catch (error) {
|
|
183
185
|
// UserInfo is optional - continue with ID token claims only
|
|
184
|
-
log_1.oidcLog.warn(`Failed to fetch UserInfo from ${
|
|
186
|
+
log_1.oidcLog.warn(`Failed to fetch UserInfo from ${userinfoUrl}, using ID token claims only:`, error);
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
// Apply custom claim mapping if configured
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flink-app/oidc-plugin",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.88",
|
|
4
4
|
"description": "Flink plugin for OIDC authentication with generic IdP support",
|
|
5
5
|
"author": "joel@frost.se",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"openid-client": "^5.7.0",
|
|
14
|
-
"@flink-app/jwt-auth-plugin": "2.0.0-alpha.
|
|
14
|
+
"@flink-app/jwt-auth-plugin": "2.0.0-alpha.88"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@flink-app/flink": ">=2.0.0-alpha.
|
|
17
|
+
"@flink-app/flink": ">=2.0.0-alpha.88",
|
|
18
18
|
"mongodb": "^6.15.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@types/node": "22.13.10",
|
|
28
28
|
"ts-node": "^10.9.2",
|
|
29
29
|
"tsc-watch": "^4.2.9",
|
|
30
|
-
"@flink-app/flink": "2.0.0-alpha.
|
|
31
|
-
"@flink-app/
|
|
32
|
-
"@flink-app/
|
|
30
|
+
"@flink-app/flink": "2.0.0-alpha.88",
|
|
31
|
+
"@flink-app/test-utils": "2.0.0-alpha.88",
|
|
32
|
+
"@flink-app/jwt-auth-plugin": "2.0.0-alpha.88"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"test": "jasmine-ts --config=./spec/support/jasmine.json",
|
|
@@ -205,14 +205,17 @@ export class OidcProvider {
|
|
|
205
205
|
let claims = { ...tokenSet.claims };
|
|
206
206
|
|
|
207
207
|
// Optionally fetch additional claims from UserInfo endpoint
|
|
208
|
-
|
|
208
|
+
// Check both manual config and discovered endpoint (via OIDC discovery)
|
|
209
|
+
const userinfoUrl = this.config.userinfoEndpoint || this.issuer?.metadata?.userinfo_endpoint;
|
|
210
|
+
|
|
211
|
+
if (includeUserInfo && userinfoUrl) {
|
|
209
212
|
try {
|
|
210
213
|
const userinfo = await this.getUserInfo(tokenSet.accessToken);
|
|
211
214
|
// Merge UserInfo claims with ID token claims
|
|
212
215
|
claims = { ...claims, ...userinfo };
|
|
213
216
|
} catch (error) {
|
|
214
217
|
// UserInfo is optional - continue with ID token claims only
|
|
215
|
-
oidcLog.warn(`Failed to fetch UserInfo from ${
|
|
218
|
+
oidcLog.warn(`Failed to fetch UserInfo from ${userinfoUrl}, using ID token claims only:`, error);
|
|
216
219
|
}
|
|
217
220
|
}
|
|
218
221
|
|