@sebspark/openapi-auth-iam 3.0.14 → 3.0.15
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.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { clearCache, getApiGatewayTokenByClientId, getApiGatewayTokenByUrl } from "@sebspark/gcp-iam";
|
|
2
|
-
|
|
3
2
|
//#region src/index.ts
|
|
4
3
|
const apiGatewayTokenByUrlGenerator = (apiKey) => {
|
|
5
4
|
return async (url) => {
|
|
@@ -26,7 +25,7 @@ const apiGatewayTokenRefresh = () => {
|
|
|
26
25
|
return await clearCache(url);
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
29
|
export { apiGatewayTokenByClientIdGenerator, apiGatewayTokenByUrlGenerator, apiGatewayTokenRefresh };
|
|
30
|
+
|
|
32
31
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n clearCache,\n getApiGatewayTokenByClientId,\n getApiGatewayTokenByUrl,\n} from '@sebspark/gcp-iam'\n\nexport const apiGatewayTokenByUrlGenerator = (apiKey: string) => {\n return async (url: string): Promise<Record<string, string>> => {\n // Skip token generation in local environment\n if (process.env.ENV === 'local') {\n return {\n 'x-api-key': apiKey,\n }\n }\n\n const token = await getApiGatewayTokenByUrl({\n apiURL: url,\n })\n\n return {\n 'Proxy-Authorization': `Bearer ${token}`,\n 'x-api-key': apiKey,\n }\n }\n}\n\nexport const apiGatewayTokenByClientIdGenerator = (\n apiKey: string,\n clientId: string\n) => {\n return async (): Promise<Record<string, string>> => {\n // Skip token generation in local environment\n if (process.env.ENV === 'local') {\n return {\n 'x-api-key': apiKey,\n }\n }\n\n const token = await getApiGatewayTokenByClientId(clientId)\n\n return {\n 'Proxy-Authorization': `Bearer ${token}`,\n 'x-api-key': apiKey,\n }\n }\n}\n\nexport const apiGatewayTokenRefresh = () => {\n return async (url: string) => {\n return await clearCache(url)\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import {\n clearCache,\n getApiGatewayTokenByClientId,\n getApiGatewayTokenByUrl,\n} from '@sebspark/gcp-iam'\n\nexport const apiGatewayTokenByUrlGenerator = (apiKey: string) => {\n return async (url: string): Promise<Record<string, string>> => {\n // Skip token generation in local environment\n if (process.env.ENV === 'local') {\n return {\n 'x-api-key': apiKey,\n }\n }\n\n const token = await getApiGatewayTokenByUrl({\n apiURL: url,\n })\n\n return {\n 'Proxy-Authorization': `Bearer ${token}`,\n 'x-api-key': apiKey,\n }\n }\n}\n\nexport const apiGatewayTokenByClientIdGenerator = (\n apiKey: string,\n clientId: string\n) => {\n return async (): Promise<Record<string, string>> => {\n // Skip token generation in local environment\n if (process.env.ENV === 'local') {\n return {\n 'x-api-key': apiKey,\n }\n }\n\n const token = await getApiGatewayTokenByClientId(clientId)\n\n return {\n 'Proxy-Authorization': `Bearer ${token}`,\n 'x-api-key': apiKey,\n }\n }\n}\n\nexport const apiGatewayTokenRefresh = () => {\n return async (url: string) => {\n return await clearCache(url)\n }\n}\n"],"mappings":";;AAMA,MAAa,iCAAiC,WAAmB;AAC/D,QAAO,OAAO,QAAiD;AAE7D,MAAI,QAAQ,IAAI,QAAQ,QACtB,QAAO,EACL,aAAa,QACd;EAGH,MAAM,QAAQ,MAAM,wBAAwB,EAC1C,QAAQ,KACT,CAAC;AAEF,SAAO;GACL,uBAAuB,UAAU;GACjC,aAAa;GACd;;;AAIL,MAAa,sCACX,QACA,aACG;AACH,QAAO,YAA6C;AAElD,MAAI,QAAQ,IAAI,QAAQ,QACtB,QAAO,EACL,aAAa,QACd;EAGH,MAAM,QAAQ,MAAM,6BAA6B,SAAS;AAE1D,SAAO;GACL,uBAAuB,UAAU;GACjC,aAAa;GACd;;;AAIL,MAAa,+BAA+B;AAC1C,QAAO,OAAO,QAAgB;AAC5B,SAAO,MAAM,WAAW,IAAI"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebspark/openapi-auth-iam",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.15",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"typecheck": "vitest --typecheck.only --passWithNoTests"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@sebspark/gcp-iam": "3.0.
|
|
26
|
+
"@sebspark/gcp-iam": "3.0.17"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|