{"_id":"@allcleardecisioning/gcloud-auth-util-server","name":"@allcleardecisioning/gcloud-auth-util-server","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@allcleardecisioning/gcloud-auth-util-server","description":"A wrapper around gcloud auth for use with postman","version":"0.0.1","repository":{"type":"git","url":"git+https://github.com/AllClear-ai/gcloud-auth-util-server.git"},"main":"dist/server.js","license":"UNLICENSED","scripts":{"build":"tsc","start":"node dist/server.js"},"dependencies":{"jsonwebtoken":"^9.0.2"},"devDependencies":{"@types/node":"20.12.6","typescript":"5.4.4","@types/jsonwebtoken":"^9.0.6","ts-node":"^10.9.2"},"_id":"@allcleardecisioning/gcloud-auth-util-server@0.0.1","gitHead":"bb5b3255d3cdfdf86f6c01366f94bd3cc809c1d0","bugs":{"url":"https://github.com/AllClear-ai/gcloud-auth-util-server/issues"},"homepage":"https://github.com/AllClear-ai/gcloud-auth-util-server#readme","_nodeVersion":"18.20.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-549BOierp4R2HqpO4HwepsWdCUNE27LW5yrXnq996SbMPbFzRzht2ZtUGnLWlNK4pmAEWf80wl/r1H6JbwJWTA==","shasum":"ff248be1dea78566b6869210b8ff6c7168c66a7a","tarball":"https://registry.npmjs.org/@allcleardecisioning/gcloud-auth-util-server/-/gcloud-auth-util-server-0.0.1.tgz","fileCount":3,"unpackedSize":3923,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXX77uaPwzQFk3Dp0tlMT8V8IoBfzpx5UlQzzfWDDW+wIhAPgMrnAy4EOWvBdYjry3s/gy87SZEiiI94PLP77pVR5V"}]},"_npmUser":{"name":"allclear-npm","email":"ops@allclear.ai"},"directories":{},"maintainers":[{"name":"allclear-npm","email":"ops@allclear.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gcloud-auth-util-server_0.0.1_1712760533762_0.3839911011100441"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-10T14:48:53.652Z","0.0.1":"2024-04-10T14:48:53.903Z","modified":"2024-04-10T14:48:54.281Z"},"maintainers":[{"name":"allclear-npm","email":"ops@allclear.ai"}],"description":"A wrapper around gcloud auth for use with postman","homepage":"https://github.com/AllClear-ai/gcloud-auth-util-server#readme","repository":{"type":"git","url":"git+https://github.com/AllClear-ai/gcloud-auth-util-server.git"},"bugs":{"url":"https://github.com/AllClear-ai/gcloud-auth-util-server/issues"},"license":"UNLICENSED","readme":"# gcloud-auth-util-server\n\nA simple server utility designed for Google Cloud authentication token management within Postman.\n\n## Installation\n\n```bash\nnpm install -g @allclear-decisioning/gcloud-auth-util-server\n```\n\n## Usage\n\n### 1. Start the server\n\n```bash\ngcloud-auth-util-server\n```\n\n### 2. Set up Postman\n\n1. Open Postman\n2. Go to your collection > Pre-request Script\n3. Add the following code:\n    ```javascript\n    try {\n        pm.sendRequest({\n            url: 'http://localhost:3333/get-token',\n            method: 'GET',\n            header: {\n                'Content-Type': 'application/json',\n            },\n        }, function (err, res) {\n            if (err) {\n                console.error('Error generating token:', err);\n            } else {\n                pm.environment.set('gcloud_token', res.text());\n            }\n        });\n    } catch (error) {\n        console.error('Error generating token:', error);\n    }\n    ```\n4. Go to your collection > Authorization\n5. Select Bearer Token\n6. Set the token by using `{{gcloud_token}}` as the token value\n7. The token will be automatically refreshed when it expires\n8. Enjoy!\n","readmeFilename":"README.md"}