@azure/identity 4.1.0-alpha.20240322.1 → 4.1.0-alpha.20240327.2
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.
- package/dist/index.js +18 -10
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +9 -2
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/credentials/authorizationCodeCredential.js +1 -1
- package/dist-esm/src/credentials/authorizationCodeCredential.js.map +1 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js +1 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js.map +1 -1
- package/dist-esm/src/credentials/clientSecretCredential.js +1 -1
- package/dist-esm/src/credentials/clientSecretCredential.js.map +1 -1
- package/dist-esm/src/credentials/interactiveBrowserCredential.js +2 -2
- package/dist-esm/src/credentials/interactiveBrowserCredential.js.map +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.browser.js +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.js +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.js.map +1 -1
- package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js +4 -3
- package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js.map +1 -1
- package/dist-esm/src/msal/nodeFlows/msalPlugins.js +4 -3
- package/dist-esm/src/msal/nodeFlows/msalPlugins.js.map +1 -1
- package/package.json +3 -2
- package/types/identity.d.ts +6 -6
package/dist/index.js
CHANGED
|
@@ -93,11 +93,18 @@ const ALL_TENANTS = ["*"];
|
|
|
93
93
|
/**
|
|
94
94
|
* @internal
|
|
95
95
|
*/
|
|
96
|
-
const CACHE_CAE_SUFFIX = "
|
|
96
|
+
const CACHE_CAE_SUFFIX = "cae";
|
|
97
97
|
/**
|
|
98
98
|
* @internal
|
|
99
99
|
*/
|
|
100
|
-
const CACHE_NON_CAE_SUFFIX = "
|
|
100
|
+
const CACHE_NON_CAE_SUFFIX = "nocae";
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*
|
|
104
|
+
* The default name for the cache persistence plugin.
|
|
105
|
+
* Matches the constant defined in the cache persistence package.
|
|
106
|
+
*/
|
|
107
|
+
const DEFAULT_TOKEN_CACHE_NAME = "msal.cache";
|
|
101
108
|
|
|
102
109
|
// Copyright (c) Microsoft Corporation.
|
|
103
110
|
// Licensed under the MIT license.
|
|
@@ -1696,8 +1703,9 @@ class MsalNode {
|
|
|
1696
1703
|
this.parentWindowHandle = (_d = options.brokerOptions) === null || _d === void 0 ? void 0 : _d.parentWindowHandle;
|
|
1697
1704
|
// If persistence has been configured
|
|
1698
1705
|
if (persistenceProvider !== undefined && ((_e = options.tokenCachePersistenceOptions) === null || _e === void 0 ? void 0 : _e.enabled)) {
|
|
1699
|
-
const
|
|
1700
|
-
const
|
|
1706
|
+
const cacheBaseName = options.tokenCachePersistenceOptions.name || DEFAULT_TOKEN_CACHE_NAME;
|
|
1707
|
+
const nonCaeOptions = Object.assign({ name: `${cacheBaseName}.${CACHE_NON_CAE_SUFFIX}` }, options.tokenCachePersistenceOptions);
|
|
1708
|
+
const caeOptions = Object.assign({ name: `${cacheBaseName}.${CACHE_CAE_SUFFIX}` }, options.tokenCachePersistenceOptions);
|
|
1701
1709
|
this.createCachePlugin = () => persistenceProvider(nonCaeOptions);
|
|
1702
1710
|
this.createCachePluginCae = () => persistenceProvider(caeOptions);
|
|
1703
1711
|
}
|
|
@@ -2893,7 +2901,7 @@ const logger$b = credentialLogger("AzureDeveloperCliCredential");
|
|
|
2893
2901
|
* Azure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy
|
|
2894
2902
|
* resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific
|
|
2895
2903
|
* to Azure developers. It allows users to authenticate as a user and/or a service principal against
|
|
2896
|
-
* <a href="https://learn.microsoft.com/
|
|
2904
|
+
* <a href="https://learn.microsoft.com/entra/fundamentals/">Microsoft Entra ID</a>. The
|
|
2897
2905
|
* AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of
|
|
2898
2906
|
* the logged-in user or service principal in the Azure Developer CLI. It acts as the Azure Developer CLI logged in user or
|
|
2899
2907
|
* service principal and executes an Azure CLI command underneath to authenticate the application against
|
|
@@ -3487,7 +3495,7 @@ const logger$7 = credentialLogger("ClientSecretCredential");
|
|
|
3487
3495
|
* that was generated for an App Registration. More information on how
|
|
3488
3496
|
* to configure a client secret can be found here:
|
|
3489
3497
|
*
|
|
3490
|
-
* https://learn.microsoft.com/
|
|
3498
|
+
* https://learn.microsoft.com/entra/identity-platform/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application
|
|
3491
3499
|
*
|
|
3492
3500
|
*/
|
|
3493
3501
|
class ClientSecretCredential {
|
|
@@ -3985,12 +3993,12 @@ class InteractiveBrowserCredential {
|
|
|
3985
3993
|
/**
|
|
3986
3994
|
* Creates an instance of InteractiveBrowserCredential with the details needed.
|
|
3987
3995
|
*
|
|
3988
|
-
* This credential uses the [Authorization Code Flow](https://learn.microsoft.com/
|
|
3996
|
+
* This credential uses the [Authorization Code Flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow).
|
|
3989
3997
|
* On Node.js, it will open a browser window while it listens for a redirect response from the authentication service.
|
|
3990
3998
|
* On browsers, it authenticates via popups. The `loginStyle` optional parameter can be set to `redirect` to authenticate by redirecting the user to an Azure secure login page, which then will redirect the user back to the web application where the authentication started.
|
|
3991
3999
|
*
|
|
3992
4000
|
* For Node.js, if a `clientId` is provided, the Microsoft Entra application will need to be configured to have a "Mobile and desktop applications" redirect endpoint.
|
|
3993
|
-
* Follow our guide on [setting up Redirect URIs for Desktop apps that calls to web APIs](https://learn.microsoft.com/
|
|
4001
|
+
* Follow our guide on [setting up Redirect URIs for Desktop apps that calls to web APIs](https://learn.microsoft.com/entra/identity-platform/scenario-desktop-app-registration#redirect-uris).
|
|
3994
4002
|
*
|
|
3995
4003
|
* @param options - Options for configuring the client which makes the authentication requests.
|
|
3996
4004
|
*/
|
|
@@ -4227,7 +4235,7 @@ const logger$1 = credentialLogger("AuthorizationCodeCredential");
|
|
|
4227
4235
|
* that was obtained through the authorization code flow, described in more detail
|
|
4228
4236
|
* in the Microsoft Entra ID documentation:
|
|
4229
4237
|
*
|
|
4230
|
-
* https://learn.microsoft.com/
|
|
4238
|
+
* https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow
|
|
4231
4239
|
*/
|
|
4232
4240
|
class AuthorizationCodeCredential {
|
|
4233
4241
|
/**
|
|
@@ -4334,7 +4342,7 @@ class MsalOnBehalfOf extends MsalNode {
|
|
|
4334
4342
|
const credentialName = "OnBehalfOfCredential";
|
|
4335
4343
|
const logger = credentialLogger(credentialName);
|
|
4336
4344
|
/**
|
|
4337
|
-
* Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://learn.microsoft.com/
|
|
4345
|
+
* Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow).
|
|
4338
4346
|
*/
|
|
4339
4347
|
class OnBehalfOfCredential {
|
|
4340
4348
|
constructor(options) {
|