@flink-app/oidc-plugin 2.0.0-alpha.88 → 2.0.0-alpha.89

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,13 @@
1
1
  # @flink-app/oidc-plugin
2
2
 
3
+ ## 2.0.0-alpha.89
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix OIDC trace logs
8
+ - @flink-app/flink@2.0.0-alpha.89
9
+ - @flink-app/jwt-auth-plugin@2.0.0-alpha.89
10
+
3
11
  ## 2.0.0-alpha.88
4
12
 
5
13
  ### 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;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAkEjC;;;;;OAKG;IACG,mBAAmB,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,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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AM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAsC/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;IAiCjG;;;;OAIG;YACW,iBAAiB;IAU/B;;;;OAIG;IACH,iBAAiB,IAAI,GAAG;CAM3B"}
@@ -122,6 +122,7 @@ class OidcProvider {
122
122
  });
123
123
  // Extract claims from ID token (already validated by openid-client)
124
124
  const claims = tokenSet.claims();
125
+ log_1.oidcLog.trace(`Provider "${this.config.issuer}": extracted claims from ID token`, claims);
125
126
  return {
126
127
  accessToken: tokenSet.access_token,
127
128
  idToken: tokenSet.id_token,
@@ -180,6 +181,7 @@ class OidcProvider {
180
181
  const userinfo = await this.getUserInfo(tokenSet.accessToken);
181
182
  // Merge UserInfo claims with ID token claims
182
183
  claims = { ...claims, ...userinfo };
184
+ log_1.oidcLog.trace(`Provider "${this.config.issuer}": merged claims after UserInfo`, claims);
183
185
  }
184
186
  catch (error) {
185
187
  // UserInfo is optional - continue with ID token claims only
@@ -190,9 +192,11 @@ class OidcProvider {
190
192
  if (this.config.claimMapping) {
191
193
  const customClaims = (0, claims_mapper_1.extractCustomClaims)(claims, this.config.claimMapping);
192
194
  claims = { ...claims, ...customClaims };
195
+ log_1.oidcLog.trace(`Provider "${this.config.issuer}": applied custom claim mapping`, claims);
193
196
  }
194
197
  // Map to normalized profile
195
198
  const profile = (0, claims_mapper_1.mapClaimsToProfile)(claims);
199
+ log_1.oidcLog.trace(`Provider "${this.config.issuer}": built final profile`, profile);
196
200
  return profile;
197
201
  }
198
202
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flink-app/oidc-plugin",
3
- "version": "2.0.0-alpha.88",
3
+ "version": "2.0.0-alpha.89",
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.88"
14
+ "@flink-app/jwt-auth-plugin": "2.0.0-alpha.89"
15
15
  },
16
16
  "peerDependencies": {
17
- "@flink-app/flink": ">=2.0.0-alpha.88",
17
+ "@flink-app/flink": ">=2.0.0-alpha.89",
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.88",
31
- "@flink-app/test-utils": "2.0.0-alpha.88",
32
- "@flink-app/jwt-auth-plugin": "2.0.0-alpha.88"
30
+ "@flink-app/flink": "2.0.0-alpha.89",
31
+ "@flink-app/test-utils": "2.0.0-alpha.89",
32
+ "@flink-app/jwt-auth-plugin": "2.0.0-alpha.89"
33
33
  },
34
34
  "scripts": {
35
35
  "test": "jasmine-ts --config=./spec/support/jasmine.json",
@@ -151,6 +151,7 @@ export class OidcProvider {
151
151
 
152
152
  // Extract claims from ID token (already validated by openid-client)
153
153
  const claims = tokenSet.claims();
154
+ oidcLog.trace(`Provider "${this.config.issuer}": extracted claims from ID token`, claims);
154
155
 
155
156
  return {
156
157
  accessToken: tokenSet.access_token!,
@@ -213,6 +214,7 @@ export class OidcProvider {
213
214
  const userinfo = await this.getUserInfo(tokenSet.accessToken);
214
215
  // Merge UserInfo claims with ID token claims
215
216
  claims = { ...claims, ...userinfo };
217
+ oidcLog.trace(`Provider "${this.config.issuer}": merged claims after UserInfo`, claims);
216
218
  } catch (error) {
217
219
  // UserInfo is optional - continue with ID token claims only
218
220
  oidcLog.warn(`Failed to fetch UserInfo from ${userinfoUrl}, using ID token claims only:`, error);
@@ -223,10 +225,12 @@ export class OidcProvider {
223
225
  if (this.config.claimMapping) {
224
226
  const customClaims = extractCustomClaims(claims, this.config.claimMapping);
225
227
  claims = { ...claims, ...customClaims };
228
+ oidcLog.trace(`Provider "${this.config.issuer}": applied custom claim mapping`, claims);
226
229
  }
227
230
 
228
231
  // Map to normalized profile
229
232
  const profile = mapClaimsToProfile(claims);
233
+ oidcLog.trace(`Provider "${this.config.issuer}": built final profile`, profile);
230
234
 
231
235
  return profile;
232
236
  }