{"name":"@azure/core-auth","version":"1.3.3-alpha.20210816.6","keywords":["azure","authentication","cloud"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/core-auth@1.3.3-alpha.20210816.6","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/README.md","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"7939b659e67f9e3c952a45c9be863534e775f1b6","tarball":"http://registry-npm.ywwl.com/@azure/core-auth/download/@azure/core-auth-1.3.3-alpha.20210816.6.tgz","fileCount":22,"integrity":"sha512-54dzsETauad2KAdhK8dUI/qq3bh1pS88PdAHU3gkkMsAieSn7G2StEmY02vddeZ6KWXI6CbCVk8cWs2bqB/RlQ==","signatures":[{"sig":"MEUCIDR6f7B0OKJGcd+SU4Z0yN7Y1+yDappleZJRH2a8+7sDAiEAtO63Kk+cdZccMlIV3++u4pZzep6kE3mIg1yR8W+ElN8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGrQhCRA9TVsSAnZWagAAKHkP/jFlXH68JHwQrhA+Rv9Q\nyT0KUsfGsuLofQ46N14u7x702pyHZ0K1viaw10h5KlhVxs0iI/3paIi+ULDP\n4XaIKo3ZOxOrcC8vS475yGh7kLHia6HZoyk/D1EG3aIPKOmyHek20CeLlECe\nC6vvdjR9ZJPwsH5cnO5voO1gT7Y8lFUe6QEB4mLWsLO74neXJ40Dypj/VLKE\nlHhvVkwT/T3dw4c/O02D9FGSppJvUTpPLYiaOCjurtzbk+b2OZDLHkSnBEe7\nTzw6Sk4M0H0V8EbUcEXsK3Uv1vJQFqyw3EOliBREWysE9zPZZLom1i539/oV\nU8xfFmo64CgMHNj2NsQbz0iMSGXdIND5EITZjsS97HXv9JQsMED55tB7gwOt\n6Ppy2aHkLft+98hBMDaeLInAXFcJdUyCTKmDydHNZU+H2A2JCO3muYZkx3UV\nAe4KmMvIFZkS1BL6j4Jgh4OMrSa5qKtnv1I9Yu1ImtbY4h0irZ7OgGYGSrzA\nO0fepkY3KkDGKVAbPjvRwV7o8Mwd7C5JFL5RTbA9fLVDS/6W+RYZp4lACh0I\nvfC76Y3pLBD60vZ6hr9mi11SFoV/7vTdUnYBxWhdqD1qDjI4qzIw/toQygeN\nBj5yaY58YRMvFEYnMZYR1v10Ri/qSz0ek6sNyGJ9lhRTmj6IaMUfx9KxJwuv\noARO\r\n=sjbU\r\n-----END PGP SIGNATURE-----\r\n","size":11046,"noattachment":false,"key":"/@azure/core-auth/-/@azure/core-auth-1.3.3-alpha.20210816.6.tgz"},"main":"dist/index.js","_from":"file:/mnt/vss/_work/1/packages/azure-core-auth/azure-core-auth-1.3.3-alpha.20210816.6.tgz","types":"./types/latest/core-auth.d.ts","module":"dist-esm/src/index.js","readme":"# Azure Core Authentication client library for JavaScript\n\nThe `@azure/core-auth` package provides core interfaces and helper methods for authenticating with Azure services using Azure Active Directory and other authentication schemes common across the Azure SDK. As a \"core\" library, it shouldn't need to be added as a dependency to any user code, only other Azure SDK libraries.\n\n## Getting started\n\n### Installation\n\nInstall this library using npm as follows\n\n```\nnpm install @azure/core-auth\n```\n\n## Key Concepts\n\nThe `TokenCredential` interface represents a credential capable of providing an authentication token. The `@azure/identity` package contains various credentials that implement the `TokenCredential` interface.\n\nThe `AzureKeyCredential` is a static key-based credential that supports key rotation via the `update` method. Use this when a single secret value is needed for authentication, e.g. when using a shared access key.\n\nThe `AzureNamedKeyCredential` is a static name/key-based credential that supports name and key rotation via the `update` method. Use this when both a secret value and a label are needed, e.g. when using a shared access key and shared access key name.\n\nThe `AzureSASCredential` is a static signature-based credential that supports updating the signature value via the `update` method. Use this when using a shared access signature.\n\n## Examples\n\n### AzureKeyCredential\n\n```js\nconst { AzureKeyCredential } = require(\"@azure/core-auth\");\n\nconst credential = new AzureKeyCredential(\"secret value\");\n// prints: \"secret value\"\nconsole.log(credential.key);\ncredential.update(\"other secret value\");\n// prints: \"other secret value\"\nconsole.log(credential.key);\n```\n\n### AzureNamedKeyCredential\n\n```js\nconst { AzureNamedKeyCredential } = require(\"@azure/core-auth\");\n\nconst credential = new AzureNamedKeyCredential(\"ManagedPolicy\", \"secret value\");\n// prints: \"ManagedPolicy, secret value\"\nconsole.log(`${credential.name}, ${credential.key}`);\ncredential.update(\"OtherManagedPolicy\", \"other secret value\");\n// prints: \"OtherManagedPolicy, other secret value\"\nconsole.log(`${credential.name}, ${credential.key}`);\n```\n\n### AzureSASCredential\n\n```js\nconst { AzureSASCredential } = require(\"@azure/core-auth\");\n\nconst credential = new AzureSASCredential(\"signature1\");\n// prints: \"signature1\"\nconsole.log(credential.signature);\ncredential.update(\"signature2\");\n// prints: \"signature2\"\nconsole.log(credential.signature);\n```\n\n## Next steps\n\nYou can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes.\n\n## Troubleshooting\n\nIf you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new).\n\n## Contributing\n\nIf you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.\n\n![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore%2Fcore-auth%2FREADME.png)\n","engines":{"node":">=12.0.0"},"scripts":{"docs":"typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src","lint":"eslint package.json api-extractor.json src test --ext .ts","pack":"npm pack 2>&1","test":"npm run clean && tsc -p . && npm run unit-test:node && rollup -c 2>&1 && npm run unit-test:browser && npm run integration-test","audit":"node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit","build":"tsc -p . && rollup -c 2>&1 && api-extractor run --local && npm run build:types","clean":"rimraf dist dist-* temp types *.tgz *.log","format":"prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"","lint:fix":"eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]","prebuild":"npm run clean","test:node":"npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node","unit-test":"npm run unit-test:node && npm run unit-test:browser","build:test":"tsc -p . && rollup -c 2>&1","build:types":"downlevel-dts types/latest/ types/3.1/","extract-api":"tsc -p . && api-extractor run --local","check-format":"prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","test:browser":"npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser","build:samples":"echo Obsolete","unit-test:node":"mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace  --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"","execute:samples":"echo skipped","integration-test":"npm run integration-test:node && npm run integration-test:browser","unit-test:browser":"echo skipped","integration-test:node":"echo skipped","integration-test:browser":"echo skipped"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"sdk-type":"client","_resolved":"","_integrity":"","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.14.14","description":"Provides low-level interfaces and helper methods for authentication in Azure SDK","directories":{},"sideEffects":false,"_nodeVersion":"14.17.5","dependencies":{"tslib":"^2.2.0","@azure/abort-controller":"^1.0.0"},"typesVersions":{"<3.6":{"types/latest/*":["types/3.1/*"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","util":"^0.12.1","mocha":"^7.1.1","eslint":"^7.15.0","rimraf":"^3.0.0","rollup":"^1.16.3","typedoc":"0.15.2","inherits":"^2.0.3","prettier":"^1.16.4","cross-env":"^7.0.2","typescript":"~4.2.0","@types/chai":"^4.1.6","@types/node":"^12.0.0","@types/mocha":"^7.0.2","downlevel-dts":"~0.4.0","@azure/dev-tool":">=1.0.0-alpha <1.0.0-alphb","mocha-junit-reporter":"^1.18.0","@microsoft/api-extractor":"7.7.11","@azure/eslint-plugin-azure-sdk":">=3.0.0-alpha <3.0.0-alphb"},"_npmOperationalInternal":{"tmp":"tmp/core-auth_1.3.3-alpha.20210816.6_1629140001106_0.8171348825260019","host":"s3://npm-registry-packages"},"publish_time":1629140001258,"_cnpm_publish_time":1629140001258,"dist-tags":{"dev":"1.10.2-alpha.20260305.6","latest":"1.11.0"}}