Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

axios-cloudrun-authenticator

abdalem19ISC1.0.0TypeScript support: included

Google Cloud Platform Cloud Run service-to-service authentication, through axios interceptors, by adding token from the internal metadata server to headers

javascript, typescript, node, axios, gcp, google cloud platform, cloud run, authentication, service-to-service, service-to-service authentication, metadata server, jwt token

readme

Axios Cloud Run Authenticator

Service-to-service authentification for your Cloud Run instances


axios-cloudrun-authenticator allow you to securize your Cloud Run instances by managing authentication between them. Be sure to follow the first point in Cloud Run Docs > Authenticating service-to-service.

Demo Code

import axiosCloudRunAuth from "axios-cloudrun-authenticator";
import axios from "axios";

const instance = axios.create(/*axiosOptions*/);
axiosCloudRunAuth(
  instance,
  serviceUrl //optionnal, default to origin of instance.defaults.baseURL, e.g.: https://myinstance.a.run.app if baseURL is https://myinstance.a.run.app or https://myinstance.a.run.app/path
);

Download & Installation

$ npm i axios-cloudrun-authenticator

Contributing

Keep it simple. Keep it minimal. Don't put every single feature just because you can.

Authors or Acknowledgments

  • abdalem

License

This project is licensed under the ISC License