{
  "_args": [
    [
      {
        "raw": "google-auto-auth@https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
        "scope": null,
        "escapedName": "google-auto-auth",
        "name": "google-auto-auth",
        "rawSpec": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
        "spec": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
        "type": "remote"
      },
      "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin"
    ]
  ],
  "_from": "google-auto-auth@>=0.7.1 <0.8.0",
  "_id": "google-auto-auth@0.7.1",
  "_inCache": true,
  "_location": "/firebase-admin/google-auto-auth",
  "_phantomChildren": {},
  "_requested": {
    "raw": "google-auto-auth@https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
    "scope": null,
    "escapedName": "google-auto-auth",
    "name": "google-auto-auth",
    "rawSpec": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
    "spec": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/firebase-admin",
    "/firebase-admin/@google-cloud/common",
    "/firebase-admin/gcs-resumable-upload"
  ],
  "_resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
  "_shasum": "c8260444912dd8ceeccd838761d56f462937bd02",
  "_shrinkwrap": null,
  "_spec": "google-auto-auth@https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.7.1.tgz",
  "_where": "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin",
  "author": {
    "name": "Stephen Sawchuk",
    "email": "sawchuk@gmail.com"
  },
  "bugs": {
    "url": "https://github.com/stephenplusplus/google-auto-auth/issues"
  },
  "dependencies": {
    "async": "^2.3.0",
    "gcp-metadata": "^0.2.0",
    "google-auth-library": "^0.10.0",
    "request": "^2.79.0"
  },
  "description": "Making it as easy as possible to authenticate a Google API request",
  "devDependencies": {
    "mocha": "^3.3.0",
    "mockery": "^2.0.0"
  },
  "engines": {
    "node": ">=0.4.0"
  },
  "files": [
    "index.js"
  ],
  "homepage": "https://github.com/stephenplusplus/google-auto-auth#readme",
  "keywords": [
    "google",
    "authentication",
    "jwt",
    "service",
    "account",
    "googleapis",
    "gcloud",
    "cloud",
    "gce",
    "compute",
    "engine",
    "auth",
    "access",
    "token"
  ],
  "license": "MIT",
  "main": "index.js",
  "name": "google-auto-auth",
  "optionalDependencies": {},
  "readme": "# google-auto-auth\n> Making it as easy as possible to authenticate a Google API request\n\n```sh\n$ npm install --save google-auto-auth\n```\n```js\nvar googleAuth = require('google-auto-auth');\n\n// Create a client\nvar auth = googleAuth();\n\nauth.authorizeRequest({\n  method: 'get',\n  uri: 'https://www.googleapis.com/something'\n}, function (err, authorizedReqOpts) {\n/*\n  authorizedReqOpts = {\n    method: 'get',\n    uri: 'https://www.googleapis.com/something',\n    headers: {\n      Authorization: 'Bearer {{token}}'\n    }\n  }\n*/\n});\n```\n\nOr, just get an access token.\n```js\nauth.getToken(function (err, token) {\n/*\n  token = 'access token'\n*/\n});\n```\n\n<a name=\"automatic-if\"></a>\nThis works automatically **if**:\n\n  - your app runs on Google Compute Engine\n  - you are authenticated with the `gcloud` sdk\n  - you have the path to a JSON key file as an environment variable named `GOOGLE_APPLICATION_CREDENTIALS`\n\nIf you do not meet those, you must provide a keyFile or credentials object.\n\n```js\nvar googleAuth = require('google-auto-auth');\n\nvar authConfig = {};\n\n// path to a key:\nauthConfig.keyFilename = '/path/to/keyfile.json';\n\n// or a credentials object:\nauthConfig.credentials = {\n  client_email: '...',\n  private_key: '...'\n};\n\n// Create a client\nvar auth = googleAuth(authConfig);\n\nauth.authorizeRequest({/*...*/}, function (err, authorizedReqOpts) {});\nauth.getToken(function (err, token) {});\n```\n\n### API\n\n#### googleAuth = require('google-auto-auth')\n\n#### auth = googleAuth([authConfig])\n\n##### authConfig\n\n- Type: `Object`\n\nSee the above section on Authentication. This object is necessary if automatic authentication is not available in your environment.\n\nEverything from the [gcloud-node Authentication Guide](https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/master/guides/authentication) applies here.\n\nAt a glance, the supported properties for this method are:\n\n- `keyFilename` - Path to a .json, .pem, or .p12 key file\n- `credentials` - Object containing `client_email` and `private_key` properties\n- `scopes` - Required scopes for the desired API request\n\nFor more details, see the Authentication Guide linked above, under \"The config object\".\n\n#### auth.authorizeRequest(reqOpts, callback)\n\nExtend an HTTP request object with an authorized header.\n\n##### callback(err, authorizedReqOpts)\n\n###### callback.err\n\n- Type: `Error`\n\nAn API error or an error if scopes are required for the request you're trying to make (check for err.code = `MISSING_SCOPE`). If you receive the missing scope error, provide the `authConfig.scopes` array with the necessary scope URLs for your request. There are examples of scopes that are required for some of the Google Cloud Platform services in the [gcloud-node Authentication Guide](https://googlecloudplatform.github.io/gcloud-node/#/authentication).\n\n###### callback.authorizedReqOpts\n\n- Type: `Object`\n\nThe reqOpts object provided has been extended with a valid access token attached to the `headers.Authorization` value. E.g.: `headers.Authorization = 'Bearer y.2343...'`.\n\n#### auth.getAuthClient(callback)\n\nGet the auth client instance from [google-auth-library](http://gitnpm.com/googleauth).\n\n##### callback(err, authClient)\n\n###### callback.err\n\n- Type: `Error`\n\nAn error that occurred while trying to get an authorization client.\n\n###### callback.authClient\n\n- Type: [`google-auth-library`](http://gitnpm.com/googleauth)\n\nThe client instance from [google-auth-library](http://gitnpm.com/googleauth). This is the underlying object this library uses.\n\n\n#### auth.getCredentials(callback)\n\nGet the `client_email` and `private_key` properties from an authorized client.\n\n##### callback(err, credentials)\n\n###### callback.err\n\n- Type: `Error`\n\nAn error that occurred while trying to get an authorization client.\n\n###### callback.credentials\n\n- Type: `Object`\n\nAn object containing `client_email` and `private_key`.\n\n\n#### auth.getEnvironment(callback)\n\nDetermine if the environment the app is running in is a Google Compute Engine instance.\n\n##### callback(err, environmentObject)\n\n###### callback.err\n\n- Type: `Null`\n\nWe won't return an error, but it's here for convention-sake.\n\n###### callback.environmentObject\n\n- Type: `Object`\n\n```js\n{\n  IS_APP_ENGINE: Boolean,\n  IS_CLOUD_FUNCTION: Boolean,\n  IS_COMPUTE_ENGINE: Boolean,\n  IS_CONTAINER_ENGINE: Boolean\n}\n```\n\nIf you've already run this function, the object will persist as `auth.environment`.\n\n\n#### auth.getProjectId(callback)\n\nGet the project ID if it was auto-detected or parsed from the provided keyfile.\n\n##### callback(err, projectId)\n\n###### callback.err\n\n- Type: `Error`\n\nAn error that occurred while trying to get an authorization client.\n\n###### callback.projectId\n\n- Type: `string`\n\nThe project ID that was parsed from the provided keyfile or auto-detected from the environment.\n\n\n#### auth.getToken(callback)\n\nGet an access token. The token will always be current. If necessary, background refreshes are handled automatically.\n\n##### callback(err, token)\n\n###### callback.err\n\n- Type: `Error`\n\nAn API error or an error if scopes are required for the request you're trying to make (check for err.code = `MISSING_SCOPE`). If you receive the missing scope error, provide the `authConfig.scopes` array with the necessary scope URLs for your request. There are examples of scopes that are required for some of the Google Cloud Platform services in the [gcloud-node Authentication Guide](https://googlecloudplatform.github.io/gcloud-node/#/authentication).\n\n###### callback.token\n\n- Type: `String`\n\nA current access token to be used during an API request.\n\n\n#### auth.isAppEngine(callback)\n\nDetermine if the environment the app is running in is a Google App Engine instance.\n\n##### callback(err, isAppEngine)\n\n###### callback.err\n\n- Type: `Null`\n\nWe won't return an error, but it's here for convention-sake.\n\n###### callback.isAppEngine\n\n- Type: `Boolean`\n\nWhether the app is in App Engine or not.\n\n\n#### auth.isCloudFunction(callback)\n\nDetermine if the environment the app is running in is a Google Cloud Function.\n\n##### callback(err, isCloudFunction)\n\n###### callback.err\n\n- Type: `Null`\n\nWe won't return an error, but it's here for convention-sake.\n\n###### callback.isCloudFunction\n\n- Type: `Boolean`\n\nWhether the app is in a Cloud Function or not.\n\n\n#### auth.isComputeEngine(callback)\n\nDetermine if the environment the app is running in is a Google Compute Engine instance.\n\n##### callback(err, isComputeEngine)\n\n###### callback.err\n\n- Type: `Null`\n\nWe won't return an error, but it's here for convention-sake.\n\n###### callback.isComputeEngine\n\n- Type: `Boolean`\n\nWhether the app is in a Compute Engine instance or not.\n\n\n#### auth.isContainerEngine(callback)\n\nDetermine if the environment the app is running in is a Google Container Engine instance.\n\n##### callback(err, isContainerEngine)\n\n###### callback.err\n\n- Type: `Null`\n\nWe won't return an error, but it's here for convention-sake.\n\n###### callback.isContainerEngine\n\n- Type: `Boolean`\n\nWhether the app is in a Container Engine instance or not.\n",
  "readmeFilename": "readme.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/stephenplusplus/google-auto-auth.git"
  },
  "scripts": {
    "test": "mocha"
  },
  "version": "0.7.1"
}
