@graphql-mesh/plugin-jwt-auth 2.0.0 → 2.0.1-alpha-8561cee07b36caa6aea9cb87f8940ba34dbf206a
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 +9 -0
- package/dist/index.d.cts +5 -6
- package/dist/index.d.ts +5 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @graphql-mesh/plugin-jwt-auth
|
|
2
2
|
|
|
3
|
+
## 2.0.1-alpha-8561cee07b36caa6aea9cb87f8940ba34dbf206a
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#1439](https://github.com/graphql-hive/gateway/pull/1439) [`8561cee`](https://github.com/graphql-hive/gateway/commit/8561cee07b36caa6aea9cb87f8940ba34dbf206a) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Improve context usage and inheritance
|
|
9
|
+
|
|
10
|
+
Now exports `JWTExtendContextFields` that can be directly used in the context generics, also updates the config making sure it's propagated.
|
|
11
|
+
|
|
3
12
|
## 2.0.0
|
|
4
13
|
### Major Changes
|
|
5
14
|
|
package/dist/index.d.cts
CHANGED
|
@@ -455,14 +455,13 @@ type JWTAuthPluginOptions = JwtPluginOptions & {
|
|
|
455
455
|
declare function useForwardedJWT(config: {
|
|
456
456
|
extensionsFieldName?: string;
|
|
457
457
|
extendContextFieldName?: string;
|
|
458
|
-
}): Plugin<
|
|
458
|
+
}): Plugin<JWTAuthContextExtension>;
|
|
459
|
+
interface JWTAuthContextExtension {
|
|
459
460
|
jwt?: JWTExtendContextFields;
|
|
460
|
-
}
|
|
461
|
+
}
|
|
461
462
|
/**
|
|
462
463
|
* This Mesh Gateway plugin is used to extract the JWT token and payload from the request and forward it to the subgraph.
|
|
463
464
|
*/
|
|
464
|
-
declare function useJWT(options: JWTAuthPluginOptions): GatewayPlugin<
|
|
465
|
-
jwt?: JWTExtendContextFields;
|
|
466
|
-
}>;
|
|
465
|
+
declare function useJWT(options: JWTAuthPluginOptions): GatewayPlugin<JWTAuthContextExtension>;
|
|
467
466
|
|
|
468
|
-
export { type JWTAuthPluginOptions, useJWT as default, useForwardedJWT, useJWT };
|
|
467
|
+
export { type JWTAuthContextExtension, type JWTAuthPluginOptions, useJWT as default, useForwardedJWT, useJWT };
|
package/dist/index.d.ts
CHANGED
|
@@ -455,14 +455,13 @@ type JWTAuthPluginOptions = JwtPluginOptions & {
|
|
|
455
455
|
declare function useForwardedJWT(config: {
|
|
456
456
|
extensionsFieldName?: string;
|
|
457
457
|
extendContextFieldName?: string;
|
|
458
|
-
}): Plugin<
|
|
458
|
+
}): Plugin<JWTAuthContextExtension>;
|
|
459
|
+
interface JWTAuthContextExtension {
|
|
459
460
|
jwt?: JWTExtendContextFields;
|
|
460
|
-
}
|
|
461
|
+
}
|
|
461
462
|
/**
|
|
462
463
|
* This Mesh Gateway plugin is used to extract the JWT token and payload from the request and forward it to the subgraph.
|
|
463
464
|
*/
|
|
464
|
-
declare function useJWT(options: JWTAuthPluginOptions): GatewayPlugin<
|
|
465
|
-
jwt?: JWTExtendContextFields;
|
|
466
|
-
}>;
|
|
465
|
+
declare function useJWT(options: JWTAuthPluginOptions): GatewayPlugin<JWTAuthContextExtension>;
|
|
467
466
|
|
|
468
|
-
export { type JWTAuthPluginOptions, useJWT as default, useForwardedJWT, useJWT };
|
|
467
|
+
export { type JWTAuthContextExtension, type JWTAuthPluginOptions, useJWT as default, useForwardedJWT, useJWT };
|