@sebspark/openapi-auth-iam 1.0.3 → 1.1.0

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/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Logger } from 'winston';
2
2
 
3
3
  declare const apiGatewayTokenByUrlGenerator: (apiKey: string, logger?: Logger) => (url: string) => Promise<Record<string, string>>;
4
- declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string) => () => Promise<Record<string, string>>;
4
+ declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string, logger?: Logger) => () => Promise<Record<string, string>>;
5
5
  declare const apiGatewayTokenRefresh: () => (url: string) => Promise<void>;
6
6
 
7
7
  export { apiGatewayTokenByClientIdGenerator, apiGatewayTokenByUrlGenerator, apiGatewayTokenRefresh };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Logger } from 'winston';
2
2
 
3
3
  declare const apiGatewayTokenByUrlGenerator: (apiKey: string, logger?: Logger) => (url: string) => Promise<Record<string, string>>;
4
- declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string) => () => Promise<Record<string, string>>;
4
+ declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string, logger?: Logger) => () => Promise<Record<string, string>>;
5
5
  declare const apiGatewayTokenRefresh: () => (url: string) => Promise<void>;
6
6
 
7
7
  export { apiGatewayTokenByClientIdGenerator, apiGatewayTokenByUrlGenerator, apiGatewayTokenRefresh };
package/dist/index.js CHANGED
@@ -38,9 +38,9 @@ var apiGatewayTokenByUrlGenerator = (apiKey, logger) => {
38
38
  };
39
39
  };
40
40
  };
41
- var apiGatewayTokenByClientIdGenerator = (apiKey, clientId) => {
41
+ var apiGatewayTokenByClientIdGenerator = (apiKey, clientId, logger) => {
42
42
  return async () => {
43
- const token = await (0, import_gcp_iam.getApiGatewayTokenByClientId)(clientId);
43
+ const token = await (0, import_gcp_iam.getApiGatewayTokenByClientId)(clientId, logger);
44
44
  return {
45
45
  "Proxy-Authorization": `Bearer ${token}`,
46
46
  "x-api-key": apiKey
package/dist/index.mjs CHANGED
@@ -16,9 +16,9 @@ var apiGatewayTokenByUrlGenerator = (apiKey, logger) => {
16
16
  };
17
17
  };
18
18
  };
19
- var apiGatewayTokenByClientIdGenerator = (apiKey, clientId) => {
19
+ var apiGatewayTokenByClientIdGenerator = (apiKey, clientId, logger) => {
20
20
  return async () => {
21
- const token = await getApiGatewayTokenByClientId(clientId);
21
+ const token = await getApiGatewayTokenByClientId(clientId, logger);
22
22
  return {
23
23
  "Proxy-Authorization": `Bearer ${token}`,
24
24
  "x-api-key": apiKey
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/openapi-auth-iam",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",