{"name":"@azure/core-auth","version":"1.9.0","keywords":["azure","authentication","cloud"],"author":"Microsoft Corporation","license":"MIT","_id":"@azure/core-auth@1.9.0","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"},"tag":"latest","dist":{"shasum":"ac725b03fabe3c892371065ee9e2041bee0fd1ac","tarball":"http://registry-npm.ywwl.com/@azure/core-auth/download/@azure/core-auth-1.9.0.tgz","fileCount":121,"integrity":"sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==","signatures":[{"sig":"MEUCIDkOS7FF1lP8/Aw1YnOll9iJQRIxBaJwx0bVXeoANm7RAiEA3LW/Q/3ZgwxGSlqLlQPhQbE2oVKe/TxrBYx/C4Pine4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":167809,"size":16299,"noattachment":false,"key":"/@azure/core-auth/-/@azure/core-auth-1.9.0.tgz"},"main":"./dist/commonjs/index.js","tshy":{"exports":{".":"./src/index.ts","./package.json":"./package.json"},"dialects":["esm","commonjs"],"selfLink":false,"esmDialects":["browser","react-native"]},"type":"module","_from":"file:M:\\SvcFab\\_App\\MS.Ess.PackageManager.Publisher_App2\\temp\\f8a62535-94c9-4ae2-a2bc-7eb62579f3e8\\azure-core-auth-1.9.0.tgz","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","browser":"./dist/browser/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"browser":{"types":"./dist/browser/index.d.ts","default":"./dist/browser/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"},"react-native":{"types":"./dist/react-native/index.d.ts","default":"./dist/react-native/index.js"}},"./package.json":"./package.json"},"scripts":{"lint":"eslint package.json api-extractor.json src test","pack":"npm pack 2>&1","test":"npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test","build":"npm run clean && dev-tool run build-package && dev-tool run extract-api","clean":"rimraf --glob dist dist-* temp types *.tgz *.log","format":"dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"","lint:fix":"eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]","test:node":"npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node","unit-test":"npm run unit-test:node && npm run unit-test:browser","build:test":"echo skipped. actual commands inlined in browser test scripts","extract-api":"dev-tool run build-package && dev-tool run extract-api","check-format":"dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"","test:browser":"npm run clean && npm run unit-test:browser && npm run integration-test:browser","build:samples":"echo Obsolete","unit-test:node":"dev-tool run test:vitest --no-test-proxy","execute:samples":"echo skipped","update-snippets":"dev-tool run update-snippets","integration-test":"npm run integration-test:node && npm run integration-test:browser","unit-test:browser":"npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --no-test-proxy --browser","integration-test:node":"echo skipped","integration-test:browser":"echo skipped"},"_npmUser":{"name":"microsoft1es","email":"npmjs@microsoft.com"},"sdk-type":"client","_resolved":"M:\\SvcFab\\_App\\MS.Ess.PackageManager.Publisher_App2\\temp\\f8a62535-94c9-4ae2-a2bc-7eb62579f3e8\\azure-core-auth-1.9.0.tgz","//metadata":{"migrationDate":"2023-03-08T18:36:03.000Z"},"_integrity":"sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==","repository":"github:Azure/azure-sdk-for-js","description":"Provides low-level interfaces and helper methods for authentication in Azure SDK","directories":{},"sideEffects":false,"_nodeVersion":"18.5.0","dependencies":{"tslib":"^2.6.2","@azure/core-util":"^1.11.0","@azure/abort-controller":"^2.0.0"},"react-native":"./dist/react-native/index.js","_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.0","rimraf":"^5.0.5","vitest":"^2.0.5","playwright":"^1.41.2","typescript":"~5.6.2","@types/node":"^18.0.0","@azure/dev-tool":"^1.0.0","@vitest/browser":"^2.0.5","@microsoft/api-extractor":"^7.40.3","@vitest/coverage-istanbul":"^2.0.5","@azure/eslint-plugin-azure-sdk":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core-auth_1.9.0_1729121750957_0.1858307732113511","host":"s3://npm-registry-packages"},"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```ts snippet:ReadmeSampleAzureKeyCredential\nimport { AzureKeyCredential } from \"@azure/core-auth\";\n\nconst credential = new AzureKeyCredential(\"secret value\");\n\nconsole.log(credential.key); // prints: \"secret value\"\n\ncredential.update(\"other secret value\");\n\nconsole.log(credential.key); // prints: \"other secret value\"\n```\n\n### AzureNamedKeyCredential\n\n```ts snippet:ReadmeSampleAzureNamedCredential\nimport { AzureNamedKeyCredential } from \"@azure/core-auth\";\n\nconst credential = new AzureNamedKeyCredential(\"ManagedPolicy\", \"secret value\");\n\nconsole.log(`${credential.name}, ${credential.key}`); // prints: \"ManagedPolicy, secret value\"\n\ncredential.update(\"OtherManagedPolicy\", \"other secret value\");\n\nconsole.log(`${credential.name}, ${credential.key}`); // prints: \"OtherManagedPolicy, other secret value\"\n```\n\n### AzureSASCredential\n\n```ts snippet:ReadmeSampleSASCredential\nimport { AzureSASCredential } from \"@azure/core-auth\";\n\nconst credential = new AzureSASCredential(\"signature1\");\n\nconsole.log(credential.signature); // prints: \"signature1\"\n\ncredential.update(\"signature2\");\n\nconsole.log(credential.signature); // prints: \"signature2\"\n```\n\n## Next steps\n\nYou can build and run the tests locally by executing `npm run 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","publish_time":1729121751197,"maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},{"name":"microsoft1es","email":"npmjs@microsoft.com"}],"_cnpm_publish_time":1729121751197,"dist-tags":{"dev":"1.10.2-alpha.20260305.6","latest":"1.11.0"}}