@azure/identity 3.3.2 → 4.0.0-alpha.20231026.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @azure/identity might be problematic. Click here for more details.

Files changed (78) hide show
  1. package/README.md +14 -14
  2. package/dist/index.js +228 -225
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/client/identityClient.js.map +1 -1
  5. package/dist-esm/src/constants.js +1 -1
  6. package/dist-esm/src/constants.js.map +1 -1
  7. package/dist-esm/src/credentials/authorityValidationOptions.js.map +1 -1
  8. package/dist-esm/src/credentials/authorizationCodeCredential.js +4 -4
  9. package/dist-esm/src/credentials/authorizationCodeCredential.js.map +1 -1
  10. package/dist-esm/src/credentials/azureCliCredential.js +1 -1
  11. package/dist-esm/src/credentials/azureCliCredential.js.map +1 -1
  12. package/dist-esm/src/credentials/azureDeveloperCliCredential.js +4 -4
  13. package/dist-esm/src/credentials/azureDeveloperCliCredential.js.map +1 -1
  14. package/dist-esm/src/credentials/azurePowerShellCredential.js +1 -1
  15. package/dist-esm/src/credentials/azurePowerShellCredential.js.map +1 -1
  16. package/dist-esm/src/credentials/brokerAuthOptions.js +2 -0
  17. package/dist-esm/src/credentials/brokerAuthOptions.js.map +1 -0
  18. package/dist-esm/src/credentials/browserCustomizationOptions.js +4 -0
  19. package/dist-esm/src/credentials/browserCustomizationOptions.js.map +1 -0
  20. package/dist-esm/src/credentials/clientAssertionCredential.js +3 -3
  21. package/dist-esm/src/credentials/clientAssertionCredential.js.map +1 -1
  22. package/dist-esm/src/credentials/clientCertificateCredential.browser.js +1 -1
  23. package/dist-esm/src/credentials/clientCertificateCredential.browser.js.map +1 -1
  24. package/dist-esm/src/credentials/clientCertificateCredential.js +2 -2
  25. package/dist-esm/src/credentials/clientCertificateCredential.js.map +1 -1
  26. package/dist-esm/src/credentials/clientSecretCredential.browser.js +4 -4
  27. package/dist-esm/src/credentials/clientSecretCredential.browser.js.map +1 -1
  28. package/dist-esm/src/credentials/clientSecretCredential.js +5 -5
  29. package/dist-esm/src/credentials/clientSecretCredential.js.map +1 -1
  30. package/dist-esm/src/credentials/deviceCodeCredential.browser.js +1 -1
  31. package/dist-esm/src/credentials/deviceCodeCredential.browser.js.map +1 -1
  32. package/dist-esm/src/credentials/deviceCodeCredential.js +4 -4
  33. package/dist-esm/src/credentials/deviceCodeCredential.js.map +1 -1
  34. package/dist-esm/src/credentials/deviceCodeCredentialOptions.js.map +1 -1
  35. package/dist-esm/src/credentials/environmentCredential.browser.js +1 -1
  36. package/dist-esm/src/credentials/environmentCredential.browser.js.map +1 -1
  37. package/dist-esm/src/credentials/environmentCredential.js +3 -3
  38. package/dist-esm/src/credentials/environmentCredential.js.map +1 -1
  39. package/dist-esm/src/credentials/environmentCredentialOptions.js.map +1 -1
  40. package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js +4 -4
  41. package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js.map +1 -1
  42. package/dist-esm/src/credentials/interactiveBrowserCredential.js +26 -9
  43. package/dist-esm/src/credentials/interactiveBrowserCredential.js.map +1 -1
  44. package/dist-esm/src/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
  45. package/dist-esm/src/credentials/managedIdentityCredential/index.js +3 -2
  46. package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +1 -1
  47. package/dist-esm/src/credentials/onBehalfOfCredential.browser.js +1 -1
  48. package/dist-esm/src/credentials/onBehalfOfCredential.browser.js.map +1 -1
  49. package/dist-esm/src/credentials/onBehalfOfCredential.js +1 -1
  50. package/dist-esm/src/credentials/onBehalfOfCredential.js.map +1 -1
  51. package/dist-esm/src/credentials/onBehalfOfCredentialOptions.js.map +1 -1
  52. package/dist-esm/src/credentials/usernamePasswordCredential.browser.js +4 -4
  53. package/dist-esm/src/credentials/usernamePasswordCredential.browser.js.map +1 -1
  54. package/dist-esm/src/credentials/usernamePasswordCredential.js +4 -4
  55. package/dist-esm/src/credentials/usernamePasswordCredential.js.map +1 -1
  56. package/dist-esm/src/credentials/workloadIdentityCredential.browser.js +2 -2
  57. package/dist-esm/src/credentials/workloadIdentityCredential.browser.js.map +1 -1
  58. package/dist-esm/src/credentials/workloadIdentityCredential.js +5 -5
  59. package/dist-esm/src/credentials/workloadIdentityCredential.js.map +1 -1
  60. package/dist-esm/src/credentials/workloadIdentityCredentialOptions.js.map +1 -1
  61. package/dist-esm/src/index.js.map +1 -1
  62. package/dist-esm/src/msal/flows.js.map +1 -1
  63. package/dist-esm/src/msal/nodeFlows/brokerOptions.js +2 -0
  64. package/dist-esm/src/msal/nodeFlows/brokerOptions.js.map +1 -0
  65. package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js +56 -8
  66. package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js.map +1 -1
  67. package/dist-esm/src/msal/nodeFlows/msalOpenBrowser.js +40 -139
  68. package/dist-esm/src/msal/nodeFlows/msalOpenBrowser.js.map +1 -1
  69. package/dist-esm/src/msal/utils.browser.js +236 -0
  70. package/dist-esm/src/msal/utils.browser.js.map +1 -0
  71. package/dist-esm/src/msal/utils.js +7 -4
  72. package/dist-esm/src/msal/utils.js.map +1 -1
  73. package/dist-esm/src/plugins/consumer.js +2 -1
  74. package/dist-esm/src/plugins/consumer.js.map +1 -1
  75. package/dist-esm/src/plugins/provider.js.map +1 -1
  76. package/dist-esm/src/tokenCredentialOptions.js.map +1 -1
  77. package/package.json +17 -18
  78. package/types/identity.d.ts +142 -68
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Azure Identity client library for JavaScript
2
2
 
3
- The Azure Identity library provides [Azure Active Directory (Azure AD)](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) token authentication through a set of convenient [TokenCredential](https://learn.microsoft.com/javascript/api/@azure/core-auth/tokencredential) implementations.
3
+ The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/azure/active-directory/fundamentals/new-name)) token authentication through a set of convenient [TokenCredential](https://learn.microsoft.com/javascript/api/@azure/core-auth/tokencredential) implementations.
4
4
 
5
5
  For examples of various credentials, see the [Azure Identity examples page](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md).
6
6
 
@@ -9,7 +9,7 @@ Key links:
9
9
  - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity)
10
10
  - [Package (npm)](https://www.npmjs.com/package/@azure/identity)
11
11
  - [API Reference Documentation](https://learn.microsoft.com/javascript/api/@azure/identity)
12
- - [Azure AD documentation](https://azure.microsoft.com/services/active-directory/)
12
+ - [Microsoft Entra ID documentation](https://azure.microsoft.com/services/active-directory/)
13
13
  - [Samples](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/v2)
14
14
 
15
15
  ## Getting started
@@ -110,13 +110,13 @@ To authenticate Azure SDK clients within web browsers, we offer the `Interactive
110
110
 
111
111
  ## Key concepts
112
112
 
113
- If this is your first time using `@azure/identity` or the Microsoft Identity platform (Azure AD), read [Using `@azure/identity` with Microsoft Identity Platform](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/using-azure-identity.md) first. This document provides a deeper understanding of the platform and how to configure your Azure account correctly.
113
+ If this is your first time using `@azure/identity` or Microsoft Entra ID, read [Using `@azure/identity` with Microsoft Entra ID](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/using-azure-identity.md) first. This document provides a deeper understanding of the platform and how to configure your Azure account correctly.
114
114
 
115
115
  ### Credentials
116
116
 
117
117
  A credential is a class which contains or can obtain the data needed for a service client to authenticate requests. Service clients across the Azure SDK accept credentials when they're constructed. Service clients use those credentials to authenticate requests to the service.
118
118
 
119
- The Azure Identity library focuses on OAuth authentication with Azure AD, and it offers a variety of credential classes capable of acquiring an Azure AD token to authenticate service requests. All of the credential classes in this library are implementations of the [TokenCredential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/src/tokenCredential.ts) abstract class, and any of them can be used by to construct service clients capable of authenticating with a TokenCredential.
119
+ The Azure Identity library focuses on OAuth authentication with Microsoft Entra ID, and it offers a variety of credential classes capable of acquiring a Microsoft Entra token to authenticate service requests. All of the credential classes in this library are implementations of the [TokenCredential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/src/tokenCredential.ts) abstract class, and any of them can be used by to construct service clients capable of authenticating with a TokenCredential.
120
120
 
121
121
  See [Credential Classes](#credential-classes).
122
122
 
@@ -217,7 +217,7 @@ For examples of how to use managed identity for authentication, see [the example
217
217
 
218
218
  ## Cloud configuration
219
219
 
220
- Credentials default to authenticating to the Azure AD endpoint for Azure Public Cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `authorityHost` argument in the constructor. The `AzureAuthorityHosts` interface defines authorities for well-known clouds. For the US Government cloud, you could instantiate a credential this way:
220
+ Credentials default to authenticating to the Microsoft Entra endpoint for Azure Public Cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `authorityHost` argument in the constructor. The `AzureAuthorityHosts` interface defines authorities for well-known clouds. For the US Government cloud, you could instantiate a credential this way:
221
221
 
222
222
  ```typescript
223
223
  import { AzureAuthorityHosts, ClientSecretCredential } from "@azure/identity";
@@ -243,7 +243,7 @@ Not all credentials require this configuration. Credentials that authenticate th
243
243
  | [`ChainedTokenCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/chainedtokencredential?view=azure-node-latest) | Allows users to define custom authentication flows composing multiple credentials. | [example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#chaining-credentials) |
244
244
  | [`EnvironmentCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/environmentcredential?view=azure-node-latest) | Authenticates a service principal or user via credential information specified in environment variables. | [example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-a-service-principal-with-environment-credentials) |
245
245
  | [`ManagedIdentityCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/managedidentitycredential?view=azure-node-latest) | Authenticates the managed identity of an Azure resource. | [example](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-in-azure-with-managed-identity) |
246
- | [`WorkloadIdentityCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/workloadidentitycredential?view=azure-node-latest)| Supports [Azure AD workload identity](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes. | |
246
+ | [`WorkloadIdentityCredential`](https://learn.microsoft.com/javascript/api/@azure/identity/workloadidentitycredential?view=azure-node-latest)| Supports [Microsoft Entra Workload ID](https://learn.microsoft.com/azure/aks/workload-identity-overview) on Kubernetes. | |
247
247
 
248
248
  ### Authenticate service principals
249
249
 
@@ -280,16 +280,16 @@ Not all credentials require this configuration. Credentials that authenticate th
280
280
 
281
281
  | Variable name | Value |
282
282
  | --------------------- | --------------------------------------- |
283
- | `AZURE_CLIENT_ID` | ID of an Azure AD application |
284
- | `AZURE_TENANT_ID` | ID of the application's Azure AD tenant |
283
+ | `AZURE_CLIENT_ID` | ID of a Microsoft Entra application |
284
+ | `AZURE_TENANT_ID` | ID of the application's Microsoft Entra tenant |
285
285
  | `AZURE_CLIENT_SECRET` | one of the application's client secrets |
286
286
 
287
287
  #### Service principal with certificate
288
288
 
289
289
  | Variable name | Value |
290
290
  | ----------------------------------- | ------------------------------------------------------------ |
291
- | `AZURE_CLIENT_ID` | ID of an Azure AD application |
292
- | `AZURE_TENANT_ID` | ID of the application's Azure AD tenant |
291
+ | `AZURE_CLIENT_ID` | ID of a Microsoft Entra application |
292
+ | `AZURE_TENANT_ID` | ID of the application's Microsoft Entra tenant |
293
293
  | `AZURE_CLIENT_CERTIFICATE_PATH` | path to a PEM-encoded certificate file including private key |
294
294
  | `AZURE_CLIENT_CERTIFICATE_PASSWORD` | password of the certificate file, if any |
295
295
 
@@ -297,8 +297,8 @@ Not all credentials require this configuration. Credentials that authenticate th
297
297
 
298
298
  | Variable name | Value |
299
299
  | ----------------- | --------------------------------------- |
300
- | `AZURE_CLIENT_ID` | ID of an Azure AD application |
301
- | `AZURE_TENANT_ID` | ID of the application's Azure AD tenant |
300
+ | `AZURE_CLIENT_ID` | ID of a Microsoft Entra application |
301
+ | `AZURE_TENANT_ID` | ID of the application's Microsoft Entra tenant |
302
302
  | `AZURE_USERNAME` | a username (usually an email address) |
303
303
  | `AZURE_PASSWORD` | that user's password |
304
304
 
@@ -314,7 +314,7 @@ Token caching is a feature provided by the Azure Identity library that allows ap
314
314
 
315
315
  - Cache tokens in memory (default) and on disk (opt-in).
316
316
  - Improve resilience and performance.
317
- - Reduce the number of requests made to Azure AD to obtain access tokens.
317
+ - Reduce the number of requests made to Microsoft Entra ID to obtain access tokens.
318
318
 
319
319
  The Azure Identity library offers both in-memory and persistent disk caching. For more details, see the [token caching documentation](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/TOKEN_CACHING.md).
320
320
 
@@ -330,7 +330,7 @@ API documentation for this library can be found on our [documentation site](http
330
330
 
331
331
  ### Client library support
332
332
 
333
- Client and management libraries listed on the [Azure SDK releases page](https://azure.github.io/azure-sdk/releases/latest/js.html) that support Azure AD authentication accept credentials from this library. Learn more about using these libraries in their documentation, which is linked from the releases page.
333
+ Client and management libraries listed on the [Azure SDK releases page](https://azure.github.io/azure-sdk/releases/latest/js.html) that support Microsoft Entra authentication accept credentials from this library. Learn more about using these libraries in their documentation, which is linked from the releases page.
334
334
 
335
335
  ### Known issues
336
336