@azure/identity 3.2.0-alpha.20230421.2 → 3.2.0-alpha.20230425.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 +6 -7
- package/dist/index.js.map +1 -1
- package/dist-esm/src/credentials/authorityValidationOptions.js.map +1 -1
- package/dist-esm/src/credentials/azureCliCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/azurePowerShellCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/clientAssertionCredential.js.map +1 -1
- package/dist-esm/src/credentials/defaultAzureCredential.js +4 -4
- package/dist-esm/src/credentials/defaultAzureCredential.js.map +1 -1
- package/dist-esm/src/credentials/defaultAzureCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -1
- package/dist-esm/src/credentials/usernamePasswordCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/workloadIdentityCredential.js +1 -2
- package/dist-esm/src/credentials/workloadIdentityCredential.js.map +1 -1
- package/dist-esm/src/credentials/workloadIdentityCredentialOptions.js.map +1 -1
- package/package.json +1 -1
- package/types/identity.d.ts +14 -10
package/dist/index.js
CHANGED
|
@@ -1999,8 +1999,7 @@ class WorkloadIdentityCredential {
|
|
|
1999
1999
|
const tenantId = workloadIdentityCredentialOptions.tenantId || process.env.AZURE_TENANT_ID;
|
|
2000
2000
|
const clientId = workloadIdentityCredentialOptions.clientId || process.env.AZURE_CLIENT_ID;
|
|
2001
2001
|
this.federatedTokenFilePath =
|
|
2002
|
-
workloadIdentityCredentialOptions.
|
|
2003
|
-
process.env.AZURE_FEDERATED_TOKEN_FILE;
|
|
2002
|
+
workloadIdentityCredentialOptions.tokenFilePath || process.env.AZURE_FEDERATED_TOKEN_FILE;
|
|
2004
2003
|
if (tenantId) {
|
|
2005
2004
|
checkTenantId(logger$g, tenantId);
|
|
2006
2005
|
}
|
|
@@ -2075,7 +2074,7 @@ function tokenExchangeMsi() {
|
|
|
2075
2074
|
async getToken(configuration, getTokenOptions = {}) {
|
|
2076
2075
|
const { scopes, clientId } = configuration;
|
|
2077
2076
|
const identityClientTokenCredentialOptions = {};
|
|
2078
|
-
const workloadIdentityCredential = new WorkloadIdentityCredential(Object.assign(Object.assign({ clientId, tenantId: process.env.AZURE_TENANT_ID,
|
|
2077
|
+
const workloadIdentityCredential = new WorkloadIdentityCredential(Object.assign(Object.assign({ clientId, tenantId: process.env.AZURE_TENANT_ID, tokenFilePath: process.env.AZURE_FEDERATED_TOKEN_FILE }, identityClientTokenCredentialOptions), { disableAuthorityValidationAndInstanceDiscovery: true }));
|
|
2079
2078
|
const token = await workloadIdentityCredential.getToken(scopes, getTokenOptions);
|
|
2080
2079
|
return token;
|
|
2081
2080
|
},
|
|
@@ -3579,7 +3578,7 @@ class DefaultWorkloadIdentityCredential extends WorkloadIdentityCredential {
|
|
|
3579
3578
|
const workloadFile = process.env.AZURE_FEDERATED_TOKEN_FILE;
|
|
3580
3579
|
const tenantId = (_c = options === null || options === void 0 ? void 0 : options.tenantId) !== null && _c !== void 0 ? _c : process.env.AZURE_TENANT_ID;
|
|
3581
3580
|
if (workloadFile && workloadIdentityClientId) {
|
|
3582
|
-
const workloadIdentityCredentialOptions = Object.assign(Object.assign({}, options), { tenantId, clientId: workloadIdentityClientId,
|
|
3581
|
+
const workloadIdentityCredentialOptions = Object.assign(Object.assign({}, options), { tenantId, clientId: workloadIdentityClientId, tokenFilePath: workloadFile });
|
|
3583
3582
|
super(workloadIdentityCredentialOptions);
|
|
3584
3583
|
}
|
|
3585
3584
|
else if (tenantId) {
|
|
@@ -3593,17 +3592,17 @@ class DefaultWorkloadIdentityCredential extends WorkloadIdentityCredential {
|
|
|
3593
3592
|
}
|
|
3594
3593
|
class DefaultAzureDeveloperCliCredential extends AzureDeveloperCliCredential {
|
|
3595
3594
|
constructor(options) {
|
|
3596
|
-
super(Object.assign({ processTimeoutInMs: options === null || options === void 0 ? void 0 : options.
|
|
3595
|
+
super(Object.assign({ processTimeoutInMs: options === null || options === void 0 ? void 0 : options.credentialProcessTimeoutInMs }, options));
|
|
3597
3596
|
}
|
|
3598
3597
|
}
|
|
3599
3598
|
class DefaultAzureCliCredential extends AzureCliCredential {
|
|
3600
3599
|
constructor(options) {
|
|
3601
|
-
super(Object.assign({ processTimeoutInMs: options === null || options === void 0 ? void 0 : options.
|
|
3600
|
+
super(Object.assign({ processTimeoutInMs: options === null || options === void 0 ? void 0 : options.credentialProcessTimeoutInMs }, options));
|
|
3602
3601
|
}
|
|
3603
3602
|
}
|
|
3604
3603
|
class DefaultAzurePowershellCredential extends AzurePowerShellCredential {
|
|
3605
3604
|
constructor(options) {
|
|
3606
|
-
super(Object.assign({ processTimeoutInMs: options === null || options === void 0 ? void 0 : options.
|
|
3605
|
+
super(Object.assign({ processTimeoutInMs: options === null || options === void 0 ? void 0 : options.credentialProcessTimeoutInMs }, options));
|
|
3607
3606
|
}
|
|
3608
3607
|
}
|
|
3609
3608
|
const defaultCredentials = [
|