@flink-app/oidc-plugin 0.14.3 → 2.0.0-alpha.48

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,44 @@
1
1
  # @flink-app/oidc-plugin
2
2
 
3
+ ## 2.0.0-alpha.48
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @flink-app/jwt-auth-plugin@2.0.0-alpha.48
9
+ - @flink-app/flink@2.0.0-alpha.48
10
+
11
+ ## 1.0.0
12
+
13
+ ### Minor Changes
14
+
15
+ - Align minor version, from now all packages in monorepo will have same version
16
+
17
+ ### Patch Changes
18
+
19
+ - ee21c29: Normalize query parameters to predictable string types
20
+
21
+ Query parameters are now automatically normalized to `string | string[]` types before reaching handlers:
22
+
23
+ - Single values: converted to strings (e.g., `?page=1` → `{ page: "1" }`)
24
+ - Repeated parameters: converted to string arrays (e.g., `?tag=a&tag=b` → `{ tag: ["a", "b"] }`)
25
+ - All types (numbers, booleans, etc.) from Express parser are converted to strings
26
+
27
+ **Breaking Change (Minor):**
28
+
29
+ - `Query` type changed from `{ [x: string]: string | string[] | undefined }` to `Record<string, string | string[]>`
30
+ - `Params` type changed from `Request["params"]` to explicit `Record<string, string>`
31
+ - Removed `undefined` from query/param types since normalization ensures values are never undefined
32
+ - Updated OAuth and OIDC plugin query type definitions to satisfy new Query constraint
33
+
34
+ This ensures predictable query and path parameter handling regardless of Express parser configuration. Handlers can reliably parse string values as needed using `Number()`, `parseInt()`, boolean comparisons, etc.
35
+
36
+ - Updated dependencies
37
+ - Updated dependencies [ee21c29]
38
+ - Updated dependencies [5c2ff97]
39
+ - @flink-app/flink@1.0.0
40
+ - @flink-app/jwt-auth-plugin@1.0.0
41
+
3
42
  ## 0.14.3
4
43
 
5
44
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * GET /oidc/:provider/callback?code=...&state=...&response_type=json
5
5
  */
6
- export default interface CallbackRequest {
6
+ type CallbackRequest = Record<string, string | string[]> & {
7
7
  /**
8
8
  * Authorization code from the IdP
9
9
  * Required for successful authentication
@@ -29,9 +29,6 @@ export default interface CallbackRequest {
29
29
  * - undefined: Redirect to redirectUri with token in URL fragment
30
30
  */
31
31
  response_type?: "json";
32
- /**
33
- * Index signature for Flink Query type compatibility
34
- */
35
- [key: string]: string | string[] | undefined;
36
- }
32
+ };
33
+ export default CallbackRequest;
37
34
  //# sourceMappingURL=CallbackRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CallbackRequest.d.ts","sourceRoot":"","sources":["../../src/schemas/CallbackRequest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,eAAe;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;CAChD"}
1
+ {"version":3,"file":"CallbackRequest.d.ts","sourceRoot":"","sources":["../../src/schemas/CallbackRequest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG;IACvD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAE1B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -3,15 +3,12 @@
3
3
  *
4
4
  * GET /oidc/:provider/initiate?redirectUri=...
5
5
  */
6
- export default interface InitiateRequest {
6
+ type InitiateRequest = Record<string, string | string[]> & {
7
7
  /**
8
8
  * Optional redirect URI after successful authentication
9
9
  * If not provided, uses the default callbackUrl from provider config
10
10
  */
11
11
  redirectUri?: string;
12
- /**
13
- * Index signature for Flink Query type compatibility
14
- */
15
- [key: string]: string | string[] | undefined;
16
- }
12
+ };
13
+ export default InitiateRequest;
17
14
  //# sourceMappingURL=InitiateRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InitiateRequest.d.ts","sourceRoot":"","sources":["../../src/schemas/InitiateRequest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,eAAe;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;CAChD"}
1
+ {"version":3,"file":"InitiateRequest.d.ts","sourceRoot":"","sources":["../../src/schemas/InitiateRequest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG;IACvD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAe,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flink-app/oidc-plugin",
3
- "version": "0.14.3",
3
+ "version": "2.0.0-alpha.48",
4
4
  "description": "Flink plugin for OIDC authentication with generic IdP support",
5
5
  "author": "joel@frost.se",
6
6
  "license": "MIT",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "peerDependencies": {
16
16
  "mongodb": "^6.15.0",
17
- "@flink-app/flink": "0.14.3",
18
- "@flink-app/jwt-auth-plugin": "0.14.1"
17
+ "@flink-app/flink": "2.0.0-alpha.48",
18
+ "@flink-app/jwt-auth-plugin": "2.0.0-alpha.48"
19
19
  },
20
20
  "peerDependenciesMeta": {
21
21
  "@flink-app/flink": {
@@ -30,9 +30,9 @@
30
30
  "@types/node": "22.13.10",
31
31
  "ts-node": "^10.9.2",
32
32
  "tsc-watch": "^4.2.9",
33
- "@flink-app/flink": "0.14.3",
34
- "@flink-app/test-utils": "0.14.1",
35
- "@flink-app/jwt-auth-plugin": "0.14.1"
33
+ "@flink-app/flink": "2.0.0-alpha.48",
34
+ "@flink-app/test-utils": "2.0.0-alpha.48",
35
+ "@flink-app/jwt-auth-plugin": "2.0.0-alpha.48"
36
36
  },
37
37
  "scripts": {
38
38
  "test": "jasmine-ts --config=./spec/support/jasmine.json",
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * GET /oidc/:provider/callback?code=...&state=...&response_type=json
5
5
  */
6
- export default interface CallbackRequest {
6
+ type CallbackRequest = Record<string, string | string[]> & {
7
7
  /**
8
8
  * Authorization code from the IdP
9
9
  * Required for successful authentication
@@ -34,8 +34,6 @@ export default interface CallbackRequest {
34
34
  */
35
35
  response_type?: "json";
36
36
 
37
- /**
38
- * Index signature for Flink Query type compatibility
39
- */
40
- [key: string]: string | string[] | undefined;
41
- }
37
+ };
38
+
39
+ export default CallbackRequest;
@@ -3,15 +3,12 @@
3
3
  *
4
4
  * GET /oidc/:provider/initiate?redirectUri=...
5
5
  */
6
- export default interface InitiateRequest {
6
+ type InitiateRequest = Record<string, string | string[]> & {
7
7
  /**
8
8
  * Optional redirect URI after successful authentication
9
9
  * If not provided, uses the default callbackUrl from provider config
10
10
  */
11
11
  redirectUri?: string;
12
+ };
12
13
 
13
- /**
14
- * Index signature for Flink Query type compatibility
15
- */
16
- [key: string]: string | string[] | undefined;
17
- }
14
+ export default InitiateRequest;