@sebspark/openapi-auth-iam 1.1.0 → 2.0.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,5 @@
1
- import { Logger } from 'winston';
2
-
3
- declare const apiGatewayTokenByUrlGenerator: (apiKey: string, logger?: Logger) => (url: string) => Promise<Record<string, string>>;
4
- declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string, logger?: Logger) => () => Promise<Record<string, string>>;
1
+ declare const apiGatewayTokenByUrlGenerator: (apiKey: string) => (url: string) => Promise<Record<string, string>>;
2
+ declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string) => () => Promise<Record<string, string>>;
5
3
  declare const apiGatewayTokenRefresh: () => (url: string) => Promise<void>;
6
4
 
7
5
  export { apiGatewayTokenByClientIdGenerator, apiGatewayTokenByUrlGenerator, apiGatewayTokenRefresh };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { Logger } from 'winston';
2
-
3
- declare const apiGatewayTokenByUrlGenerator: (apiKey: string, logger?: Logger) => (url: string) => Promise<Record<string, string>>;
4
- declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string, logger?: Logger) => () => Promise<Record<string, string>>;
1
+ declare const apiGatewayTokenByUrlGenerator: (apiKey: string) => (url: string) => Promise<Record<string, string>>;
2
+ declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string) => () => Promise<Record<string, string>>;
5
3
  declare const apiGatewayTokenRefresh: () => (url: string) => Promise<void>;
6
4
 
7
5
  export { apiGatewayTokenByClientIdGenerator, apiGatewayTokenByUrlGenerator, apiGatewayTokenRefresh };
package/dist/index.js CHANGED
@@ -26,11 +26,10 @@ __export(index_exports, {
26
26
  });
27
27
  module.exports = __toCommonJS(index_exports);
28
28
  var import_gcp_iam = require("@sebspark/gcp-iam");
29
- var apiGatewayTokenByUrlGenerator = (apiKey, logger) => {
29
+ var apiGatewayTokenByUrlGenerator = (apiKey) => {
30
30
  return async (url) => {
31
31
  const token = await (0, import_gcp_iam.getApiGatewayTokenByUrl)({
32
- apiURL: url,
33
- logger
32
+ apiURL: url
34
33
  });
35
34
  return {
36
35
  "Proxy-Authorization": `Bearer ${token}`,
@@ -38,9 +37,9 @@ var apiGatewayTokenByUrlGenerator = (apiKey, logger) => {
38
37
  };
39
38
  };
40
39
  };
41
- var apiGatewayTokenByClientIdGenerator = (apiKey, clientId, logger) => {
40
+ var apiGatewayTokenByClientIdGenerator = (apiKey, clientId) => {
42
41
  return async () => {
43
- const token = await (0, import_gcp_iam.getApiGatewayTokenByClientId)(clientId, logger);
42
+ const token = await (0, import_gcp_iam.getApiGatewayTokenByClientId)(clientId);
44
43
  return {
45
44
  "Proxy-Authorization": `Bearer ${token}`,
46
45
  "x-api-key": apiKey
package/dist/index.mjs CHANGED
@@ -4,11 +4,10 @@ import {
4
4
  getApiGatewayTokenByClientId,
5
5
  getApiGatewayTokenByUrl
6
6
  } from "@sebspark/gcp-iam";
7
- var apiGatewayTokenByUrlGenerator = (apiKey, logger) => {
7
+ var apiGatewayTokenByUrlGenerator = (apiKey) => {
8
8
  return async (url) => {
9
9
  const token = await getApiGatewayTokenByUrl({
10
- apiURL: url,
11
- logger
10
+ apiURL: url
12
11
  });
13
12
  return {
14
13
  "Proxy-Authorization": `Bearer ${token}`,
@@ -16,9 +15,9 @@ var apiGatewayTokenByUrlGenerator = (apiKey, logger) => {
16
15
  };
17
16
  };
18
17
  };
19
- var apiGatewayTokenByClientIdGenerator = (apiKey, clientId, logger) => {
18
+ var apiGatewayTokenByClientIdGenerator = (apiKey, clientId) => {
20
19
  return async () => {
21
- const token = await getApiGatewayTokenByClientId(clientId, logger);
20
+ const token = await getApiGatewayTokenByClientId(clientId);
22
21
  return {
23
22
  "Proxy-Authorization": `Bearer ${token}`,
24
23
  "x-api-key": apiKey
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/openapi-auth-iam",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",