@azure/identity 4.5.1-alpha.20241112.1 → 4.5.1-alpha.20241113.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/client/identityClient.d.ts +65 -0
- package/dist/browser/client/identityClient.d.ts.map +1 -0
- package/dist/browser/client/identityClient.js +248 -0
- package/dist/browser/client/identityClient.js.map +1 -0
- package/dist/browser/constants.d.ts +64 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/credentials/authorityValidationOptions.d.ts +16 -0
- package/dist/browser/credentials/authorityValidationOptions.d.ts.map +1 -0
- package/dist/browser/credentials/authorizationCodeCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/authorizationCodeCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/authorizationCodeCredential.d.ts +11 -0
- package/dist/browser/credentials/authorizationCodeCredential.js +16 -0
- package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
- package/dist/browser/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/authorizationCodeCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/azureApplicationCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/azureApplicationCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/azureApplicationCredential.d.ts +24 -0
- package/dist/browser/credentials/azureApplicationCredential.js +34 -0
- package/dist/browser/credentials/azureApplicationCredentialOptions.d.ts +13 -0
- package/dist/browser/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/azureApplicationCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/azureCliCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/azureCliCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/azureCliCredential.d.ts +13 -0
- package/dist/browser/credentials/azureCliCredential.js +23 -0
- package/dist/browser/credentials/azureCliCredentialOptions.d.ts +20 -0
- package/dist/browser/credentials/azureCliCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/azureCliCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/azureDeveloperCliCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/azureDeveloperCliCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/azureDeveloperCliCredential.d.ts +13 -0
- package/dist/browser/credentials/azureDeveloperCliCredential.js +23 -0
- package/dist/browser/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
- package/dist/browser/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/azurePipelinesCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/azurePipelinesCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/azurePipelinesCredential.d.ts +13 -0
- package/dist/browser/credentials/azurePipelinesCredential.js +23 -0
- package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
- package/dist/browser/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/azurePipelinesCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/azurePowerShellCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/azurePowerShellCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/azurePowerShellCredential.d.ts +12 -0
- package/dist/browser/credentials/azurePowerShellCredential.js +22 -0
- package/dist/browser/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
- package/dist/browser/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/azurePowerShellCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/brokerAuthOptions.d.ts +13 -0
- package/dist/browser/credentials/brokerAuthOptions.d.ts.map +1 -0
- package/dist/browser/credentials/brokerAuthOptions.js.map +1 -0
- package/dist/browser/credentials/browserCustomizationOptions.d.ts +19 -0
- package/dist/browser/credentials/browserCustomizationOptions.d.ts.map +1 -0
- package/dist/browser/credentials/chainedTokenCredential.d.ts +49 -0
- package/dist/browser/credentials/chainedTokenCredential.d.ts.map +1 -0
- package/dist/browser/credentials/chainedTokenCredential.js +90 -0
- package/dist/browser/credentials/chainedTokenCredential.js.map +1 -0
- package/dist/browser/credentials/clientAssertionCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/clientAssertionCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/clientAssertionCredential.d.ts +12 -0
- package/dist/browser/credentials/clientAssertionCredential.js +22 -0
- package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts +9 -0
- package/dist/browser/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/clientAssertionCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/clientCertificateCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/clientCertificateCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/clientCertificateCredential.d.ts +13 -0
- package/dist/browser/credentials/clientCertificateCredential.js +23 -0
- package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts +14 -0
- package/dist/browser/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/clientCertificateCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/clientSecretCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/clientSecretCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/clientSecretCredential.d.ts +40 -0
- package/dist/browser/credentials/clientSecretCredential.js +83 -0
- package/dist/browser/credentials/clientSecretCredentialOptions.d.ts +9 -0
- package/dist/browser/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/clientSecretCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/credentialPersistenceOptions.d.ts +29 -0
- package/dist/browser/credentials/credentialPersistenceOptions.d.ts.map +1 -0
- package/dist/browser/credentials/credentialPersistenceOptions.js.map +1 -0
- package/dist/browser/credentials/defaultAzureCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/defaultAzureCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/defaultAzureCredential.d.ts +19 -0
- package/dist/browser/credentials/defaultAzureCredential.js +29 -0
- package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts +49 -0
- package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/defaultAzureCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/deviceCodeCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/deviceCodeCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/deviceCodeCredential.d.ts +13 -0
- package/dist/browser/credentials/deviceCodeCredential.js +23 -0
- package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts +53 -0
- package/dist/browser/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/deviceCodeCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/environmentCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/environmentCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/environmentCredential.d.ts +13 -0
- package/dist/browser/credentials/environmentCredential.js +23 -0
- package/dist/browser/credentials/environmentCredentialOptions.d.ts +9 -0
- package/dist/browser/credentials/environmentCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/environmentCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/interactiveBrowserCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/interactiveBrowserCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/interactiveBrowserCredential.d.ts +53 -0
- package/dist/browser/credentials/interactiveBrowserCredential.js +86 -0
- package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
- package/dist/browser/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/interactiveCredentialOptions.d.ts +25 -0
- package/dist/browser/credentials/interactiveCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/interactiveCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js +122 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/index-browser.d.mts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/index-browser.mjs.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/index.d.ts +6 -0
- package/dist/browser/credentials/managedIdentityCredential/index.js +16 -0
- package/dist/browser/credentials/managedIdentityCredential/models.d.ts +24 -0
- package/dist/browser/credentials/managedIdentityCredential/models.d.ts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/models.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
- package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js +32 -0
- package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/utils.d.ts +33 -0
- package/dist/browser/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
- package/dist/browser/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
- package/dist/browser/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/onBehalfOfCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/onBehalfOfCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/onBehalfOfCredential.d.ts +12 -0
- package/dist/browser/credentials/onBehalfOfCredential.js +23 -0
- package/dist/browser/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
- package/dist/browser/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/onBehalfOfCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/usernamePasswordCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/usernamePasswordCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/usernamePasswordCredential.d.ts +40 -0
- package/dist/browser/credentials/usernamePasswordCredential.js +77 -0
- package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
- package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/usernamePasswordCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredential.d.ts +15 -0
- package/dist/browser/credentials/visualStudioCodeCredential.js +27 -0
- package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
- package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
- package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
- package/dist/browser/credentials/workloadIdentityCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/workloadIdentityCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/workloadIdentityCredential.d.ts +17 -0
- package/dist/browser/credentials/workloadIdentityCredential.js +27 -0
- package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
- package/dist/browser/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/workloadIdentityCredentialOptions.js.map +1 -0
- package/dist/browser/errors.d.ts +139 -0
- package/dist/browser/errors.d.ts.map +1 -0
- package/dist/browser/index.d.ts +59 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +34 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/msal/browserFlows/flows.d.ts +42 -0
- package/dist/browser/msal/browserFlows/flows.d.ts.map +1 -0
- package/dist/browser/msal/browserFlows/flows.js.map +1 -0
- package/dist/browser/msal/browserFlows/msalAuthCode.d.ts +50 -0
- package/dist/browser/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
- package/dist/browser/msal/browserFlows/msalAuthCode.js +203 -0
- package/dist/browser/msal/browserFlows/msalAuthCode.js.map +1 -0
- package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
- package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
- package/dist/browser/msal/browserFlows/msalBrowserCommon.js +116 -0
- package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -0
- package/dist/browser/msal/credentials.d.ts +52 -0
- package/dist/browser/msal/credentials.d.ts.map +1 -0
- package/dist/browser/msal/credentials.js.map +1 -0
- package/dist/browser/msal/msal-browser.d.mts.map +1 -0
- package/dist/browser/msal/msal-browser.mjs.map +1 -0
- package/dist/browser/msal/msal.d.ts +3 -0
- package/dist/browser/msal/msal.js +5 -0
- package/dist/browser/msal/nodeFlows/brokerOptions.d.ts +44 -0
- package/dist/browser/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
- package/dist/browser/msal/nodeFlows/msalClient.d.ts +186 -0
- package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +1 -0
- package/dist/browser/msal/nodeFlows/msalClient.js +477 -0
- package/dist/browser/msal/nodeFlows/msalClient.js.map +1 -0
- package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +91 -0
- package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
- package/dist/browser/msal/nodeFlows/msalPlugins.js +87 -0
- package/dist/browser/msal/nodeFlows/msalPlugins.js.map +1 -0
- package/dist/browser/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
- package/dist/browser/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
- package/dist/browser/msal/types.d.ts +87 -0
- package/dist/browser/msal/types.d.ts.map +1 -0
- package/dist/browser/msal/utils.d.ts +95 -0
- package/dist/browser/msal/utils.d.ts.map +1 -0
- package/dist/browser/msal/utils.js +232 -0
- package/dist/browser/msal/utils.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/plugins/consumer-browser.d.mts.map +1 -0
- package/dist/browser/plugins/consumer-browser.mjs.map +1 -0
- package/dist/browser/plugins/consumer.d.ts +2 -0
- package/dist/browser/plugins/consumer.js +7 -0
- package/dist/browser/plugins/provider.d.ts +36 -0
- package/dist/browser/plugins/provider.d.ts.map +1 -0
- package/dist/browser/plugins/provider.js.map +1 -0
- package/dist/browser/regionalAuthority.d.ts +122 -0
- package/dist/browser/regionalAuthority.d.ts.map +1 -0
- package/dist/browser/tokenCredentialOptions.d.ts +28 -0
- package/dist/browser/tokenCredentialOptions.d.ts.map +1 -0
- package/dist/browser/tokenProvider.d.ts +38 -0
- package/dist/browser/tokenProvider.d.ts.map +1 -0
- package/dist/browser/util/authHostEnv-browser.d.mts +4 -0
- package/dist/browser/util/authHostEnv-browser.d.mts.map +1 -0
- package/dist/browser/util/authHostEnv-browser.mjs +7 -0
- package/dist/browser/util/authHostEnv-browser.mjs.map +1 -0
- package/dist/browser/util/identityTokenEndpoint.d.ts +2 -0
- package/dist/browser/util/identityTokenEndpoint.d.ts.map +1 -0
- package/dist/browser/util/logging.d.ts +70 -0
- package/dist/browser/util/logging.d.ts.map +1 -0
- package/dist/browser/util/processMultiTenantRequest-browser.d.mts.map +1 -0
- package/dist/browser/util/processMultiTenantRequest-browser.mjs.map +1 -0
- package/dist/browser/util/processMultiTenantRequest.d.ts +9 -0
- package/dist/browser/util/processMultiTenantRequest.js +29 -0
- package/dist/browser/util/processUtils.d.ts +13 -0
- package/dist/browser/util/processUtils.d.ts.map +1 -0
- package/dist/browser/util/scopeUtils.d.ts +17 -0
- package/dist/browser/util/scopeUtils.d.ts.map +1 -0
- package/dist/browser/util/scopeUtils.js +29 -0
- package/dist/browser/util/scopeUtils.js.map +1 -0
- package/dist/browser/util/subscriptionUtils.d.ts +6 -0
- package/dist/browser/util/subscriptionUtils.d.ts.map +1 -0
- package/dist/browser/util/subscriptionUtils.js +14 -0
- package/dist/browser/util/subscriptionUtils.js.map +1 -0
- package/dist/browser/util/tenantIdUtils.d.ts +15 -0
- package/dist/browser/util/tenantIdUtils.d.ts.map +1 -0
- package/dist/browser/util/tenantIdUtils.js +44 -0
- package/dist/browser/util/tenantIdUtils.js.map +1 -0
- package/dist/browser/util/tracing.d.ts +6 -0
- package/dist/browser/util/tracing.d.ts.map +1 -0
- package/dist/browser/util/tracing.js +14 -0
- package/dist/browser/util/tracing.js.map +1 -0
- package/dist/commonjs/client/identityClient.d.ts +65 -0
- package/dist/commonjs/client/identityClient.d.ts.map +1 -0
- package/dist/commonjs/client/identityClient.js +253 -0
- package/dist/commonjs/client/identityClient.js.map +1 -0
- package/dist/commonjs/constants.d.ts +64 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +73 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/credentials/authorityValidationOptions.d.ts +16 -0
- package/dist/commonjs/credentials/authorityValidationOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/authorityValidationOptions.js +5 -0
- package/dist/commonjs/credentials/authorityValidationOptions.js.map +1 -0
- package/dist/commonjs/credentials/authorizationCodeCredential.d.ts +73 -0
- package/dist/commonjs/credentials/authorizationCodeCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/authorizationCodeCredential.js +64 -0
- package/dist/commonjs/credentials/authorizationCodeCredential.js.map +1 -0
- package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
- package/dist/commonjs/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/authorizationCodeCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/azureApplicationCredential.d.ts +24 -0
- package/dist/commonjs/credentials/azureApplicationCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureApplicationCredential.js +36 -0
- package/dist/commonjs/credentials/azureApplicationCredential.js.map +1 -0
- package/dist/commonjs/credentials/azureApplicationCredentialOptions.d.ts +13 -0
- package/dist/commonjs/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureApplicationCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/azureApplicationCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/azureCliCredential.d.ts +64 -0
- package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureCliCredential.js +194 -0
- package/dist/commonjs/credentials/azureCliCredential.js.map +1 -0
- package/dist/commonjs/credentials/azureCliCredentialOptions.d.ts +20 -0
- package/dist/commonjs/credentials/azureCliCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureCliCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/azureCliCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts +71 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredential.js +176 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredential.js.map +1 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/azurePipelinesCredential.d.ts +38 -0
- package/dist/commonjs/credentials/azurePipelinesCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azurePipelinesCredential.js +146 -0
- package/dist/commonjs/credentials/azurePipelinesCredential.js.map +1 -0
- package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
- package/dist/commonjs/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/azurePipelinesCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/azurePowerShellCredential.d.ts +75 -0
- package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azurePowerShellCredential.js +235 -0
- package/dist/commonjs/credentials/azurePowerShellCredential.js.map +1 -0
- package/dist/commonjs/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
- package/dist/commonjs/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/azurePowerShellCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/brokerAuthOptions.d.ts +13 -0
- package/dist/commonjs/credentials/brokerAuthOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/brokerAuthOptions.js +3 -0
- package/dist/commonjs/credentials/brokerAuthOptions.js.map +1 -0
- package/dist/commonjs/credentials/browserCustomizationOptions.d.ts +19 -0
- package/dist/commonjs/credentials/browserCustomizationOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/browserCustomizationOptions.js +5 -0
- package/dist/commonjs/credentials/browserCustomizationOptions.js.map +1 -0
- package/dist/commonjs/credentials/chainedTokenCredential.d.ts +49 -0
- package/dist/commonjs/credentials/chainedTokenCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/chainedTokenCredential.js +94 -0
- package/dist/commonjs/credentials/chainedTokenCredential.js.map +1 -0
- package/dist/commonjs/credentials/clientAssertionCredential.d.ts +33 -0
- package/dist/commonjs/credentials/clientAssertionCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientAssertionCredential.js +59 -0
- package/dist/commonjs/credentials/clientAssertionCredential.js.map +1 -0
- package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts +9 -0
- package/dist/commonjs/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientAssertionCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/clientAssertionCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/clientCertificateCredential.d.ts +101 -0
- package/dist/commonjs/credentials/clientCertificateCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientCertificateCredential.js +124 -0
- package/dist/commonjs/credentials/clientCertificateCredential.js.map +1 -0
- package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts +14 -0
- package/dist/commonjs/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientCertificateCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/clientCertificateCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/clientSecretCredential.d.ts +37 -0
- package/dist/commonjs/credentials/clientSecretCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientSecretCredential.js +64 -0
- package/dist/commonjs/credentials/clientSecretCredential.js.map +1 -0
- package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts +9 -0
- package/dist/commonjs/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientSecretCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/clientSecretCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/credentialPersistenceOptions.d.ts +29 -0
- package/dist/commonjs/credentials/credentialPersistenceOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/credentialPersistenceOptions.js +5 -0
- package/dist/commonjs/credentials/credentialPersistenceOptions.js.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredential.d.ts +65 -0
- package/dist/commonjs/credentials/defaultAzureCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredential.js +171 -0
- package/dist/commonjs/credentials/defaultAzureCredential.js.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts +49 -0
- package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/defaultAzureCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/deviceCodeCredential.d.ts +67 -0
- package/dist/commonjs/credentials/deviceCodeCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/deviceCodeCredential.js +96 -0
- package/dist/commonjs/credentials/deviceCodeCredential.js.map +1 -0
- package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts +53 -0
- package/dist/commonjs/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/deviceCodeCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/deviceCodeCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/environmentCredential.d.ts +52 -0
- package/dist/commonjs/credentials/environmentCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/environmentCredential.js +135 -0
- package/dist/commonjs/credentials/environmentCredential.js.map +1 -0
- package/dist/commonjs/credentials/environmentCredentialOptions.d.ts +9 -0
- package/dist/commonjs/credentials/environmentCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/environmentCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/environmentCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/interactiveBrowserCredential.d.ts +56 -0
- package/dist/commonjs/credentials/interactiveBrowserCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/interactiveBrowserCredential.js +95 -0
- package/dist/commonjs/credentials/interactiveBrowserCredential.js.map +1 -0
- package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
- package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts +25 -0
- package/dist/commonjs/credentials/interactiveCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/interactiveCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/interactiveCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js +125 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +36 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts +95 -0
- package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/index.js +221 -0
- package/dist/commonjs/credentials/managedIdentityCredential/index.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/models.d.ts +24 -0
- package/dist/commonjs/credentials/managedIdentityCredential/models.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/models.js +5 -0
- package/dist/commonjs/credentials/managedIdentityCredential/models.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
- package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js +35 -0
- package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts +33 -0
- package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/utils.js +82 -0
- package/dist/commonjs/credentials/managedIdentityCredential/utils.js.map +1 -0
- package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
- package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/onBehalfOfCredential.d.ts +102 -0
- package/dist/commonjs/credentials/onBehalfOfCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/onBehalfOfCredential.js +116 -0
- package/dist/commonjs/credentials/onBehalfOfCredential.js.map +1 -0
- package/dist/commonjs/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
- package/dist/commonjs/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/onBehalfOfCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/usernamePasswordCredential.d.ts +41 -0
- package/dist/commonjs/credentials/usernamePasswordCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/usernamePasswordCredential.js +71 -0
- package/dist/commonjs/credentials/usernamePasswordCredential.js.map +1 -0
- package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
- package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/usernamePasswordCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts +60 -0
- package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredential.js +196 -0
- package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js +5 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
- package/dist/commonjs/credentials/workloadIdentityCredential.d.ts +47 -0
- package/dist/commonjs/credentials/workloadIdentityCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/workloadIdentityCredential.js +118 -0
- package/dist/commonjs/credentials/workloadIdentityCredential.js.map +1 -0
- package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
- package/dist/commonjs/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js +5 -0
- package/dist/commonjs/credentials/workloadIdentityCredentialOptions.js.map +1 -0
- package/dist/commonjs/errors.d.ts +139 -0
- package/dist/commonjs/errors.d.ts.map +1 -0
- package/dist/commonjs/errors.js +130 -0
- package/dist/commonjs/errors.js.map +1 -0
- package/dist/commonjs/index.d.ts +59 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +69 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/msal/browserFlows/flows.d.ts +42 -0
- package/dist/commonjs/msal/browserFlows/flows.d.ts.map +1 -0
- package/dist/commonjs/msal/browserFlows/flows.js +5 -0
- package/dist/commonjs/msal/browserFlows/flows.js.map +1 -0
- package/dist/commonjs/msal/browserFlows/msalAuthCode.d.ts +50 -0
- package/dist/commonjs/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
- package/dist/commonjs/msal/browserFlows/msalAuthCode.js +208 -0
- package/dist/commonjs/msal/browserFlows/msalAuthCode.js.map +1 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +121 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +1 -0
- package/dist/commonjs/msal/credentials.d.ts +52 -0
- package/dist/commonjs/msal/credentials.d.ts.map +1 -0
- package/dist/commonjs/msal/credentials.js +5 -0
- package/dist/commonjs/msal/credentials.js.map +1 -0
- package/dist/commonjs/msal/msal.d.ts +3 -0
- package/dist/commonjs/msal/msal.d.ts.map +1 -0
- package/dist/commonjs/msal/msal.js +9 -0
- package/dist/commonjs/msal/msal.js.map +1 -0
- package/dist/commonjs/msal/nodeFlows/brokerOptions.d.ts +44 -0
- package/dist/commonjs/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
- package/dist/commonjs/msal/nodeFlows/brokerOptions.js +3 -0
- package/dist/commonjs/msal/nodeFlows/brokerOptions.js.map +1 -0
- package/dist/commonjs/msal/nodeFlows/msalClient.d.ts +186 -0
- package/dist/commonjs/msal/nodeFlows/msalClient.d.ts.map +1 -0
- package/dist/commonjs/msal/nodeFlows/msalClient.js +482 -0
- package/dist/commonjs/msal/nodeFlows/msalClient.js.map +1 -0
- package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts +91 -0
- package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
- package/dist/commonjs/msal/nodeFlows/msalPlugins.js +91 -0
- package/dist/commonjs/msal/nodeFlows/msalPlugins.js.map +1 -0
- package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
- package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
- package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js +5 -0
- package/dist/commonjs/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
- package/dist/commonjs/msal/types.d.ts +87 -0
- package/dist/commonjs/msal/types.d.ts.map +1 -0
- package/dist/commonjs/msal/types.js +5 -0
- package/dist/commonjs/msal/types.js.map +1 -0
- package/dist/commonjs/msal/utils.d.ts +95 -0
- package/dist/commonjs/msal/utils.d.ts.map +1 -0
- package/dist/commonjs/msal/utils.js +247 -0
- package/dist/commonjs/msal/utils.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/plugins/consumer.d.ts +28 -0
- package/dist/commonjs/plugins/consumer.d.ts.map +1 -0
- package/dist/commonjs/plugins/consumer.js +46 -0
- package/dist/commonjs/plugins/consumer.js.map +1 -0
- package/dist/commonjs/plugins/provider.d.ts +36 -0
- package/dist/commonjs/plugins/provider.d.ts.map +1 -0
- package/dist/commonjs/plugins/provider.js +5 -0
- package/dist/commonjs/plugins/provider.js.map +1 -0
- package/dist/commonjs/regionalAuthority.d.ts +122 -0
- package/dist/commonjs/regionalAuthority.d.ts.map +1 -0
- package/dist/commonjs/regionalAuthority.js +144 -0
- package/dist/commonjs/regionalAuthority.js.map +1 -0
- package/dist/commonjs/tokenCredentialOptions.d.ts +28 -0
- package/dist/commonjs/tokenCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/tokenCredentialOptions.js +5 -0
- package/dist/commonjs/tokenCredentialOptions.js.map +1 -0
- package/dist/commonjs/tokenProvider.d.ts +38 -0
- package/dist/commonjs/tokenProvider.d.ts.map +1 -0
- package/dist/commonjs/tokenProvider.js +55 -0
- package/dist/commonjs/tokenProvider.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/util/identityTokenEndpoint.d.ts +2 -0
- package/dist/commonjs/util/identityTokenEndpoint.d.ts.map +1 -0
- package/dist/commonjs/util/identityTokenEndpoint.js +14 -0
- package/dist/commonjs/util/identityTokenEndpoint.js.map +1 -0
- package/dist/commonjs/util/logging.d.ts +70 -0
- package/dist/commonjs/util/logging.d.ts.map +1 -0
- package/dist/commonjs/util/logging.js +103 -0
- package/dist/commonjs/util/logging.js.map +1 -0
- package/dist/commonjs/util/processMultiTenantRequest.d.ts +10 -0
- package/dist/commonjs/util/processMultiTenantRequest.d.ts.map +1 -0
- package/dist/commonjs/util/processMultiTenantRequest.js +38 -0
- package/dist/commonjs/util/processMultiTenantRequest.js.map +1 -0
- package/dist/commonjs/util/processUtils.d.ts +13 -0
- package/dist/commonjs/util/processUtils.d.ts.map +1 -0
- package/dist/commonjs/util/processUtils.js +36 -0
- package/dist/commonjs/util/processUtils.js.map +1 -0
- package/dist/commonjs/util/scopeUtils.d.ts +17 -0
- package/dist/commonjs/util/scopeUtils.d.ts.map +1 -0
- package/dist/commonjs/util/scopeUtils.js +34 -0
- package/dist/commonjs/util/scopeUtils.js.map +1 -0
- package/dist/commonjs/util/subscriptionUtils.d.ts +6 -0
- package/dist/commonjs/util/subscriptionUtils.d.ts.map +1 -0
- package/dist/commonjs/util/subscriptionUtils.js +17 -0
- package/dist/commonjs/util/subscriptionUtils.js.map +1 -0
- package/dist/commonjs/util/tenantIdUtils.d.ts +15 -0
- package/dist/commonjs/util/tenantIdUtils.d.ts.map +1 -0
- package/dist/commonjs/util/tenantIdUtils.js +51 -0
- package/dist/commonjs/util/tenantIdUtils.js.map +1 -0
- package/dist/commonjs/util/tracing.d.ts +6 -0
- package/dist/commonjs/util/tracing.d.ts.map +1 -0
- package/dist/commonjs/util/tracing.js +17 -0
- package/dist/commonjs/util/tracing.js.map +1 -0
- package/dist/esm/client/identityClient.d.ts +65 -0
- package/dist/esm/client/identityClient.d.ts.map +1 -0
- package/dist/esm/client/identityClient.js +248 -0
- package/dist/esm/client/identityClient.js.map +1 -0
- package/dist/esm/constants.d.ts +64 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +70 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/credentials/authorityValidationOptions.d.ts +16 -0
- package/dist/esm/credentials/authorityValidationOptions.d.ts.map +1 -0
- package/dist/esm/credentials/authorityValidationOptions.js +4 -0
- package/dist/esm/credentials/authorityValidationOptions.js.map +1 -0
- package/dist/esm/credentials/authorizationCodeCredential.d.ts +73 -0
- package/dist/esm/credentials/authorizationCodeCredential.d.ts.map +1 -0
- package/dist/esm/credentials/authorizationCodeCredential.js +60 -0
- package/dist/esm/credentials/authorizationCodeCredential.js.map +1 -0
- package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
- package/dist/esm/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/authorizationCodeCredentialOptions.js +4 -0
- package/dist/esm/credentials/authorizationCodeCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/azureApplicationCredential.d.ts +24 -0
- package/dist/esm/credentials/azureApplicationCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azureApplicationCredential.js +32 -0
- package/dist/esm/credentials/azureApplicationCredential.js.map +1 -0
- package/dist/esm/credentials/azureApplicationCredentialOptions.d.ts +13 -0
- package/dist/esm/credentials/azureApplicationCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/azureApplicationCredentialOptions.js +4 -0
- package/dist/esm/credentials/azureApplicationCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/azureCliCredential.d.ts +64 -0
- package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azureCliCredential.js +189 -0
- package/dist/esm/credentials/azureCliCredential.js.map +1 -0
- package/dist/esm/credentials/azureCliCredentialOptions.d.ts +20 -0
- package/dist/esm/credentials/azureCliCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/azureCliCredentialOptions.js +4 -0
- package/dist/esm/credentials/azureCliCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/azureDeveloperCliCredential.d.ts +71 -0
- package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azureDeveloperCliCredential.js +171 -0
- package/dist/esm/credentials/azureDeveloperCliCredential.js.map +1 -0
- package/dist/esm/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
- package/dist/esm/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/azureDeveloperCliCredentialOptions.js +4 -0
- package/dist/esm/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/azurePipelinesCredential.d.ts +38 -0
- package/dist/esm/credentials/azurePipelinesCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azurePipelinesCredential.js +141 -0
- package/dist/esm/credentials/azurePipelinesCredential.js.map +1 -0
- package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
- package/dist/esm/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/azurePipelinesCredentialOptions.js +4 -0
- package/dist/esm/credentials/azurePipelinesCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/azurePowerShellCredential.d.ts +75 -0
- package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azurePowerShellCredential.js +229 -0
- package/dist/esm/credentials/azurePowerShellCredential.js.map +1 -0
- package/dist/esm/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
- package/dist/esm/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/azurePowerShellCredentialOptions.js +4 -0
- package/dist/esm/credentials/azurePowerShellCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/brokerAuthOptions.d.ts +13 -0
- package/dist/esm/credentials/brokerAuthOptions.d.ts.map +1 -0
- package/dist/esm/credentials/brokerAuthOptions.js +2 -0
- package/dist/esm/credentials/brokerAuthOptions.js.map +1 -0
- package/dist/esm/credentials/browserCustomizationOptions.d.ts +19 -0
- package/dist/esm/credentials/browserCustomizationOptions.d.ts.map +1 -0
- package/dist/esm/credentials/browserCustomizationOptions.js +4 -0
- package/dist/esm/credentials/browserCustomizationOptions.js.map +1 -0
- package/dist/esm/credentials/chainedTokenCredential.d.ts +49 -0
- package/dist/esm/credentials/chainedTokenCredential.d.ts.map +1 -0
- package/dist/esm/credentials/chainedTokenCredential.js +90 -0
- package/dist/esm/credentials/chainedTokenCredential.js.map +1 -0
- package/dist/esm/credentials/clientAssertionCredential.d.ts +33 -0
- package/dist/esm/credentials/clientAssertionCredential.d.ts.map +1 -0
- package/dist/esm/credentials/clientAssertionCredential.js +55 -0
- package/dist/esm/credentials/clientAssertionCredential.js.map +1 -0
- package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts +9 -0
- package/dist/esm/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/clientAssertionCredentialOptions.js +4 -0
- package/dist/esm/credentials/clientAssertionCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/clientCertificateCredential.d.ts +101 -0
- package/dist/esm/credentials/clientCertificateCredential.d.ts.map +1 -0
- package/dist/esm/credentials/clientCertificateCredential.js +119 -0
- package/dist/esm/credentials/clientCertificateCredential.js.map +1 -0
- package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts +14 -0
- package/dist/esm/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/clientCertificateCredentialOptions.js +4 -0
- package/dist/esm/credentials/clientCertificateCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/clientSecretCredential.d.ts +37 -0
- package/dist/esm/credentials/clientSecretCredential.d.ts.map +1 -0
- package/dist/esm/credentials/clientSecretCredential.js +60 -0
- package/dist/esm/credentials/clientSecretCredential.js.map +1 -0
- package/dist/esm/credentials/clientSecretCredentialOptions.d.ts +9 -0
- package/dist/esm/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/clientSecretCredentialOptions.js +4 -0
- package/dist/esm/credentials/clientSecretCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/credentialPersistenceOptions.d.ts +29 -0
- package/dist/esm/credentials/credentialPersistenceOptions.d.ts.map +1 -0
- package/dist/esm/credentials/credentialPersistenceOptions.js +4 -0
- package/dist/esm/credentials/credentialPersistenceOptions.js.map +1 -0
- package/dist/esm/credentials/defaultAzureCredential.d.ts +65 -0
- package/dist/esm/credentials/defaultAzureCredential.d.ts.map +1 -0
- package/dist/esm/credentials/defaultAzureCredential.js +164 -0
- package/dist/esm/credentials/defaultAzureCredential.js.map +1 -0
- package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts +49 -0
- package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/defaultAzureCredentialOptions.js +4 -0
- package/dist/esm/credentials/defaultAzureCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/deviceCodeCredential.d.ts +67 -0
- package/dist/esm/credentials/deviceCodeCredential.d.ts.map +1 -0
- package/dist/esm/credentials/deviceCodeCredential.js +91 -0
- package/dist/esm/credentials/deviceCodeCredential.js.map +1 -0
- package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts +53 -0
- package/dist/esm/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/deviceCodeCredentialOptions.js +4 -0
- package/dist/esm/credentials/deviceCodeCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/environmentCredential.d.ts +52 -0
- package/dist/esm/credentials/environmentCredential.d.ts.map +1 -0
- package/dist/esm/credentials/environmentCredential.js +130 -0
- package/dist/esm/credentials/environmentCredential.js.map +1 -0
- package/dist/esm/credentials/environmentCredentialOptions.d.ts +9 -0
- package/dist/esm/credentials/environmentCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/environmentCredentialOptions.js +4 -0
- package/dist/esm/credentials/environmentCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/interactiveBrowserCredential.d.ts +56 -0
- package/dist/esm/credentials/interactiveBrowserCredential.d.ts.map +1 -0
- package/dist/esm/credentials/interactiveBrowserCredential.js +91 -0
- package/dist/esm/credentials/interactiveBrowserCredential.js.map +1 -0
- package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
- package/dist/esm/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/interactiveBrowserCredentialOptions.js +4 -0
- package/dist/esm/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/interactiveCredentialOptions.d.ts +25 -0
- package/dist/esm/credentials/interactiveCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/interactiveCredentialOptions.js +4 -0
- package/dist/esm/credentials/interactiveCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsMsi.js +122 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +12 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js +33 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/index.d.ts +95 -0
- package/dist/esm/credentials/managedIdentityCredential/index.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/index.js +217 -0
- package/dist/esm/credentials/managedIdentityCredential/index.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/models.d.ts +24 -0
- package/dist/esm/credentials/managedIdentityCredential/models.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/models.js +4 -0
- package/dist/esm/credentials/managedIdentityCredential/models.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
- package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js +32 -0
- package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/utils.d.ts +33 -0
- package/dist/esm/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/utils.js +77 -0
- package/dist/esm/credentials/managedIdentityCredential/utils.js.map +1 -0
- package/dist/esm/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
- package/dist/esm/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/multiTenantTokenCredentialOptions.js +4 -0
- package/dist/esm/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/onBehalfOfCredential.d.ts +102 -0
- package/dist/esm/credentials/onBehalfOfCredential.d.ts.map +1 -0
- package/dist/esm/credentials/onBehalfOfCredential.js +112 -0
- package/dist/esm/credentials/onBehalfOfCredential.js.map +1 -0
- package/dist/esm/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
- package/dist/esm/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/onBehalfOfCredentialOptions.js +4 -0
- package/dist/esm/credentials/onBehalfOfCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/usernamePasswordCredential.d.ts +41 -0
- package/dist/esm/credentials/usernamePasswordCredential.d.ts.map +1 -0
- package/dist/esm/credentials/usernamePasswordCredential.js +67 -0
- package/dist/esm/credentials/usernamePasswordCredential.js.map +1 -0
- package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts +9 -0
- package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/usernamePasswordCredentialOptions.js +4 -0
- package/dist/esm/credentials/usernamePasswordCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredential.d.ts +60 -0
- package/dist/esm/credentials/visualStudioCodeCredential.d.ts.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredential.js +190 -0
- package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredentialOptions.d.ts +11 -0
- package/dist/esm/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredentialOptions.js +4 -0
- package/dist/esm/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts +11 -0
- package/dist/esm/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js +4 -0
- package/dist/esm/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
- package/dist/esm/credentials/workloadIdentityCredential.d.ts +47 -0
- package/dist/esm/credentials/workloadIdentityCredential.d.ts.map +1 -0
- package/dist/esm/credentials/workloadIdentityCredential.js +114 -0
- package/dist/esm/credentials/workloadIdentityCredential.js.map +1 -0
- package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
- package/dist/esm/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/workloadIdentityCredentialOptions.js +4 -0
- package/dist/esm/credentials/workloadIdentityCredentialOptions.js.map +1 -0
- package/dist/esm/errors.d.ts +139 -0
- package/dist/esm/errors.d.ts.map +1 -0
- package/dist/esm/errors.js +123 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/index.d.ts +59 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +34 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/msal/browserFlows/flows.d.ts +42 -0
- package/dist/esm/msal/browserFlows/flows.d.ts.map +1 -0
- package/dist/esm/msal/browserFlows/flows.js +4 -0
- package/dist/esm/msal/browserFlows/flows.js.map +1 -0
- package/dist/esm/msal/browserFlows/msalAuthCode.d.ts +50 -0
- package/dist/esm/msal/browserFlows/msalAuthCode.d.ts.map +1 -0
- package/dist/esm/msal/browserFlows/msalAuthCode.js +203 -0
- package/dist/esm/msal/browserFlows/msalAuthCode.js.map +1 -0
- package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts +106 -0
- package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
- package/dist/esm/msal/browserFlows/msalBrowserCommon.js +116 -0
- package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +1 -0
- package/dist/esm/msal/credentials.d.ts +52 -0
- package/dist/esm/msal/credentials.d.ts.map +1 -0
- package/dist/esm/msal/credentials.js +4 -0
- package/dist/esm/msal/credentials.js.map +1 -0
- package/dist/esm/msal/msal.d.ts +3 -0
- package/dist/esm/msal/msal.d.ts.map +1 -0
- package/dist/esm/msal/nodeFlows/brokerOptions.d.ts +44 -0
- package/dist/esm/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
- package/dist/esm/msal/nodeFlows/brokerOptions.js +2 -0
- package/dist/esm/msal/nodeFlows/brokerOptions.js.map +1 -0
- package/dist/esm/msal/nodeFlows/msalClient.d.ts +186 -0
- package/dist/esm/msal/nodeFlows/msalClient.d.ts.map +1 -0
- package/dist/esm/msal/nodeFlows/msalClient.js +477 -0
- package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -0
- package/dist/esm/msal/nodeFlows/msalPlugins.d.ts +91 -0
- package/dist/esm/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
- package/dist/esm/msal/nodeFlows/msalPlugins.js +87 -0
- package/dist/esm/msal/nodeFlows/msalPlugins.js.map +1 -0
- package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
- package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
- package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.js +4 -0
- package/dist/esm/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
- package/dist/esm/msal/types.d.ts +87 -0
- package/dist/esm/msal/types.d.ts.map +1 -0
- package/dist/esm/msal/types.js +4 -0
- package/dist/esm/msal/types.js.map +1 -0
- package/dist/esm/msal/utils.d.ts +95 -0
- package/dist/esm/msal/utils.d.ts.map +1 -0
- package/dist/esm/msal/utils.js +232 -0
- package/dist/esm/msal/utils.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/plugins/consumer.d.ts +28 -0
- package/dist/esm/plugins/consumer.d.ts.map +1 -0
- package/dist/esm/plugins/consumer.js +43 -0
- package/dist/esm/plugins/consumer.js.map +1 -0
- package/dist/esm/plugins/provider.d.ts +36 -0
- package/dist/esm/plugins/provider.d.ts.map +1 -0
- package/dist/esm/plugins/provider.js +4 -0
- package/dist/esm/plugins/provider.js.map +1 -0
- package/dist/esm/regionalAuthority.d.ts +122 -0
- package/dist/esm/regionalAuthority.d.ts.map +1 -0
- package/dist/esm/regionalAuthority.js +140 -0
- package/dist/esm/regionalAuthority.js.map +1 -0
- package/dist/esm/tokenCredentialOptions.d.ts +28 -0
- package/dist/esm/tokenCredentialOptions.d.ts.map +1 -0
- package/dist/esm/tokenCredentialOptions.js +4 -0
- package/dist/esm/tokenCredentialOptions.js.map +1 -0
- package/dist/esm/tokenProvider.d.ts +38 -0
- package/dist/esm/tokenProvider.d.ts.map +1 -0
- package/dist/esm/tokenProvider.js +52 -0
- package/dist/esm/tokenProvider.js.map +1 -0
- package/dist/esm/util/authHostEnv-browser.d.mts +4 -0
- package/dist/esm/util/authHostEnv-browser.d.mts.map +1 -0
- package/dist/esm/util/authHostEnv-browser.mjs +7 -0
- package/dist/esm/util/authHostEnv-browser.mjs.map +1 -0
- package/dist/esm/util/identityTokenEndpoint.d.ts +2 -0
- package/dist/esm/util/identityTokenEndpoint.d.ts.map +1 -0
- package/dist/esm/util/identityTokenEndpoint.js +11 -0
- package/dist/esm/util/identityTokenEndpoint.js.map +1 -0
- package/dist/esm/util/logging.d.ts +70 -0
- package/dist/esm/util/logging.d.ts.map +1 -0
- package/dist/esm/util/logging.js +94 -0
- package/dist/esm/util/logging.js.map +1 -0
- package/dist/esm/util/processMultiTenantRequest.d.ts +10 -0
- package/dist/esm/util/processMultiTenantRequest.d.ts.map +1 -0
- package/dist/esm/util/processMultiTenantRequest.js +35 -0
- package/dist/esm/util/processMultiTenantRequest.js.map +1 -0
- package/dist/esm/util/processUtils.d.ts +13 -0
- package/dist/esm/util/processUtils.d.ts.map +1 -0
- package/dist/esm/util/processUtils.js +32 -0
- package/dist/esm/util/processUtils.js.map +1 -0
- package/dist/esm/util/scopeUtils.d.ts +17 -0
- package/dist/esm/util/scopeUtils.d.ts.map +1 -0
- package/dist/esm/util/scopeUtils.js +29 -0
- package/dist/esm/util/scopeUtils.js.map +1 -0
- package/dist/esm/util/subscriptionUtils.d.ts +6 -0
- package/dist/esm/util/subscriptionUtils.d.ts.map +1 -0
- package/dist/esm/util/subscriptionUtils.js +14 -0
- package/dist/esm/util/subscriptionUtils.js.map +1 -0
- package/dist/esm/util/tenantIdUtils.d.ts +15 -0
- package/dist/esm/util/tenantIdUtils.d.ts.map +1 -0
- package/dist/esm/util/tenantIdUtils.js +44 -0
- package/dist/esm/util/tenantIdUtils.js.map +1 -0
- package/dist/esm/util/tracing.d.ts +6 -0
- package/dist/esm/util/tracing.d.ts.map +1 -0
- package/dist/esm/util/tracing.js +14 -0
- package/dist/esm/util/tracing.js.map +1 -0
- package/package.json +52 -63
- package/dist/index.js +0 -4200
- package/dist/index.js.map +0 -1
- package/dist-esm/src/client/identityClient.js +0 -248
- package/dist-esm/src/client/identityClient.js.map +0 -1
- package/dist-esm/src/credentials/authorizationCodeCredential.browser.js +0 -16
- package/dist-esm/src/credentials/authorizationCodeCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/authorizationCodeCredential.js +0 -60
- package/dist-esm/src/credentials/authorizationCodeCredential.js.map +0 -1
- package/dist-esm/src/credentials/authorizationCodeCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/azureApplicationCredential.browser.js +0 -34
- package/dist-esm/src/credentials/azureApplicationCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/azureApplicationCredential.js +0 -32
- package/dist-esm/src/credentials/azureApplicationCredential.js.map +0 -1
- package/dist-esm/src/credentials/azureApplicationCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/azureCliCredential.browser.js +0 -23
- package/dist-esm/src/credentials/azureCliCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/azureCliCredential.js +0 -189
- package/dist-esm/src/credentials/azureCliCredential.js.map +0 -1
- package/dist-esm/src/credentials/azureCliCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js +0 -23
- package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js +0 -171
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js.map +0 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/azurePipelinesCredential.browser.js +0 -23
- package/dist-esm/src/credentials/azurePipelinesCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/azurePipelinesCredential.js +0 -141
- package/dist-esm/src/credentials/azurePipelinesCredential.js.map +0 -1
- package/dist-esm/src/credentials/azurePipelinesCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/azurePowerShellCredential.browser.js +0 -22
- package/dist-esm/src/credentials/azurePowerShellCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/azurePowerShellCredential.js +0 -229
- package/dist-esm/src/credentials/azurePowerShellCredential.js.map +0 -1
- package/dist-esm/src/credentials/azurePowerShellCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/brokerAuthOptions.js.map +0 -1
- package/dist-esm/src/credentials/chainedTokenCredential.js +0 -90
- package/dist-esm/src/credentials/chainedTokenCredential.js.map +0 -1
- package/dist-esm/src/credentials/clientAssertionCredential.browser.js +0 -22
- package/dist-esm/src/credentials/clientAssertionCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/clientAssertionCredential.js +0 -55
- package/dist-esm/src/credentials/clientAssertionCredential.js.map +0 -1
- package/dist-esm/src/credentials/clientAssertionCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/clientCertificateCredential.browser.js +0 -23
- package/dist-esm/src/credentials/clientCertificateCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/clientCertificateCredential.js +0 -119
- package/dist-esm/src/credentials/clientCertificateCredential.js.map +0 -1
- package/dist-esm/src/credentials/clientCertificateCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/clientSecretCredential.browser.js +0 -83
- package/dist-esm/src/credentials/clientSecretCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/clientSecretCredential.js +0 -60
- package/dist-esm/src/credentials/clientSecretCredential.js.map +0 -1
- package/dist-esm/src/credentials/clientSecretCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/credentialPersistenceOptions.js.map +0 -1
- package/dist-esm/src/credentials/defaultAzureCredential.browser.js +0 -29
- package/dist-esm/src/credentials/defaultAzureCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/defaultAzureCredential.js +0 -164
- package/dist-esm/src/credentials/defaultAzureCredential.js.map +0 -1
- package/dist-esm/src/credentials/defaultAzureCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/deviceCodeCredential.browser.js +0 -23
- package/dist-esm/src/credentials/deviceCodeCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/deviceCodeCredential.js +0 -91
- package/dist-esm/src/credentials/deviceCodeCredential.js.map +0 -1
- package/dist-esm/src/credentials/deviceCodeCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/environmentCredential.browser.js +0 -23
- package/dist-esm/src/credentials/environmentCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/environmentCredential.js +0 -130
- package/dist-esm/src/credentials/environmentCredential.js.map +0 -1
- package/dist-esm/src/credentials/environmentCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js +0 -86
- package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/interactiveBrowserCredential.js +0 -91
- package/dist-esm/src/credentials/interactiveBrowserCredential.js.map +0 -1
- package/dist-esm/src/credentials/interactiveBrowserCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/interactiveCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js +0 -122
- package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
- package/dist-esm/src/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.browser.js +0 -16
- package/dist-esm/src/credentials/managedIdentityCredential/index.browser.js.map +0 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.js +0 -217
- package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +0 -1
- package/dist-esm/src/credentials/managedIdentityCredential/models.js.map +0 -1
- package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -32
- package/dist-esm/src/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
- package/dist-esm/src/credentials/multiTenantTokenCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.browser.js +0 -23
- package/dist-esm/src/credentials/onBehalfOfCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.js +0 -112
- package/dist-esm/src/credentials/onBehalfOfCredential.js.map +0 -1
- package/dist-esm/src/credentials/onBehalfOfCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/usernamePasswordCredential.browser.js +0 -77
- package/dist-esm/src/credentials/usernamePasswordCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/usernamePasswordCredential.js +0 -67
- package/dist-esm/src/credentials/usernamePasswordCredential.js.map +0 -1
- package/dist-esm/src/credentials/usernamePasswordCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/visualStudioCodeCredential.browser.js +0 -27
- package/dist-esm/src/credentials/visualStudioCodeCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/visualStudioCodeCredential.js +0 -190
- package/dist-esm/src/credentials/visualStudioCodeCredential.js.map +0 -1
- package/dist-esm/src/credentials/visualStudioCodeCredentialOptions.js.map +0 -1
- package/dist-esm/src/credentials/workloadIdentityCredential.browser.js +0 -27
- package/dist-esm/src/credentials/workloadIdentityCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/workloadIdentityCredential.js +0 -114
- package/dist-esm/src/credentials/workloadIdentityCredential.js.map +0 -1
- package/dist-esm/src/credentials/workloadIdentityCredentialOptions.js.map +0 -1
- package/dist-esm/src/index.js +0 -34
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/msal/browserFlows/flows.js.map +0 -1
- package/dist-esm/src/msal/browserFlows/msalAuthCode.js +0 -203
- package/dist-esm/src/msal/browserFlows/msalAuthCode.js.map +0 -1
- package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js +0 -116
- package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js.map +0 -1
- package/dist-esm/src/msal/credentials.js.map +0 -1
- package/dist-esm/src/msal/msal.browser.js +0 -5
- package/dist-esm/src/msal/msal.browser.js.map +0 -1
- package/dist-esm/src/msal/nodeFlows/msalClient.js +0 -484
- package/dist-esm/src/msal/nodeFlows/msalClient.js.map +0 -1
- package/dist-esm/src/msal/nodeFlows/msalPlugins.js +0 -87
- package/dist-esm/src/msal/nodeFlows/msalPlugins.js.map +0 -1
- package/dist-esm/src/msal/utils.js +0 -232
- package/dist-esm/src/msal/utils.js.map +0 -1
- package/dist-esm/src/plugins/consumer.browser.js +0 -7
- package/dist-esm/src/plugins/consumer.browser.js.map +0 -1
- package/dist-esm/src/plugins/consumer.js +0 -43
- package/dist-esm/src/plugins/consumer.js.map +0 -1
- package/dist-esm/src/plugins/provider.js.map +0 -1
- package/dist-esm/src/util/authHostEnv.browser.js +0 -7
- package/dist-esm/src/util/authHostEnv.browser.js.map +0 -1
- package/dist-esm/src/util/processMultiTenantRequest.browser.js +0 -29
- package/dist-esm/src/util/processMultiTenantRequest.browser.js.map +0 -1
- package/dist-esm/src/util/processMultiTenantRequest.js +0 -35
- package/dist-esm/src/util/processMultiTenantRequest.js.map +0 -1
- package/dist-esm/src/util/scopeUtils.js +0 -29
- package/dist-esm/src/util/scopeUtils.js.map +0 -1
- package/dist-esm/src/util/subscriptionUtils.js +0 -14
- package/dist-esm/src/util/subscriptionUtils.js.map +0 -1
- package/dist-esm/src/util/tenantIdUtils.js +0 -44
- package/dist-esm/src/util/tenantIdUtils.js.map +0 -1
- package/dist-esm/src/util/tracing.js +0 -14
- package/dist-esm/src/util/tracing.js.map +0 -1
- /package/{dist-esm/src → dist/browser}/constants.js +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/authorityValidationOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/authorityValidationOptions.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/authorizationCodeCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/azureApplicationCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/azureCliCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/azureDeveloperCliCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/azurePipelinesCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/azurePowerShellCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/brokerAuthOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/browserCustomizationOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/browserCustomizationOptions.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/clientAssertionCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/clientCertificateCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/clientSecretCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/credentialPersistenceOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/defaultAzureCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/deviceCodeCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/environmentCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/interactiveBrowserCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/interactiveCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/models.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/utils.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/managedIdentityCredential/utils.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/multiTenantTokenCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/onBehalfOfCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/usernamePasswordCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialPlugin.js +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/visualStudioCodeCredentialPlugin.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/credentials/workloadIdentityCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/errors.js +0 -0
- /package/{dist-esm/src → dist/browser}/errors.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/msal/browserFlows/flows.js +0 -0
- /package/{dist-esm/src → dist/browser}/msal/credentials.js +0 -0
- /package/{dist-esm/src → dist/browser}/msal/nodeFlows/brokerOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/msal/nodeFlows/brokerOptions.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/msal/nodeFlows/tokenCachePersistenceOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/msal/nodeFlows/tokenCachePersistenceOptions.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/msal/types.js +0 -0
- /package/{dist-esm/src → dist/browser}/msal/types.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/plugins/provider.js +0 -0
- /package/{dist-esm/src → dist/browser}/regionalAuthority.js +0 -0
- /package/{dist-esm/src → dist/browser}/regionalAuthority.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/tokenCredentialOptions.js +0 -0
- /package/{dist-esm/src → dist/browser}/tokenCredentialOptions.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/tokenProvider.js +0 -0
- /package/{dist-esm/src → dist/browser}/tokenProvider.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/util/identityTokenEndpoint.js +0 -0
- /package/{dist-esm/src → dist/browser}/util/identityTokenEndpoint.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/util/logging.js +0 -0
- /package/{dist-esm/src → dist/browser}/util/logging.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/util/processUtils.js +0 -0
- /package/{dist-esm/src → dist/browser}/util/processUtils.js.map +0 -0
- /package/{dist-esm/src → dist/esm}/msal/msal.js +0 -0
- /package/{dist-esm/src → dist/esm}/msal/msal.js.map +0 -0
- /package/{types → dist}/identity.d.ts +0 -0
@@ -0,0 +1,190 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import { credentialLogger, formatError, formatSuccess } from "../util/logging.js";
|
4
|
+
import { processMultiTenantRequest, resolveAdditionallyAllowedTenantIds, } from "../util/tenantIdUtils.js";
|
5
|
+
import { AzureAuthorityHosts } from "../constants.js";
|
6
|
+
import { CredentialUnavailableError } from "../errors.js";
|
7
|
+
import { IdentityClient } from "../client/identityClient.js";
|
8
|
+
import { checkTenantId } from "../util/tenantIdUtils.js";
|
9
|
+
import fs from "node:fs";
|
10
|
+
import os from "node:os";
|
11
|
+
import path from "node:path";
|
12
|
+
const CommonTenantId = "common";
|
13
|
+
const AzureAccountClientId = "aebc6443-996d-45c2-90f0-388ff96faa56"; // VSC: 'aebc6443-996d-45c2-90f0-388ff96faa56'
|
14
|
+
const logger = credentialLogger("VisualStudioCodeCredential");
|
15
|
+
let findCredentials = undefined;
|
16
|
+
export const vsCodeCredentialControl = {
|
17
|
+
setVsCodeCredentialFinder(finder) {
|
18
|
+
findCredentials = finder;
|
19
|
+
},
|
20
|
+
};
|
21
|
+
// Map of unsupported Tenant IDs and the errors we will be throwing.
|
22
|
+
const unsupportedTenantIds = {
|
23
|
+
adfs: "The VisualStudioCodeCredential does not support authentication with ADFS tenants.",
|
24
|
+
};
|
25
|
+
function checkUnsupportedTenant(tenantId) {
|
26
|
+
// If the Tenant ID isn't supported, we throw.
|
27
|
+
const unsupportedTenantError = unsupportedTenantIds[tenantId];
|
28
|
+
if (unsupportedTenantError) {
|
29
|
+
throw new CredentialUnavailableError(unsupportedTenantError);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
const mapVSCodeAuthorityHosts = {
|
33
|
+
AzureCloud: AzureAuthorityHosts.AzurePublicCloud,
|
34
|
+
AzureChina: AzureAuthorityHosts.AzureChina,
|
35
|
+
AzureGermanCloud: AzureAuthorityHosts.AzureGermany,
|
36
|
+
AzureUSGovernment: AzureAuthorityHosts.AzureGovernment,
|
37
|
+
};
|
38
|
+
/**
|
39
|
+
* Attempts to load a specific property from the VSCode configurations of the current OS.
|
40
|
+
* If it fails at any point, returns undefined.
|
41
|
+
*/
|
42
|
+
export function getPropertyFromVSCode(property) {
|
43
|
+
const settingsPath = ["User", "settings.json"];
|
44
|
+
// Eventually we can add more folders for more versions of VSCode.
|
45
|
+
const vsCodeFolder = "Code";
|
46
|
+
const homedir = os.homedir();
|
47
|
+
function loadProperty(...pathSegments) {
|
48
|
+
const fullPath = path.join(...pathSegments, vsCodeFolder, ...settingsPath);
|
49
|
+
const settings = JSON.parse(fs.readFileSync(fullPath, { encoding: "utf8" }));
|
50
|
+
return settings[property];
|
51
|
+
}
|
52
|
+
try {
|
53
|
+
let appData;
|
54
|
+
switch (process.platform) {
|
55
|
+
case "win32":
|
56
|
+
appData = process.env.APPDATA;
|
57
|
+
return appData ? loadProperty(appData) : undefined;
|
58
|
+
case "darwin":
|
59
|
+
return loadProperty(homedir, "Library", "Application Support");
|
60
|
+
case "linux":
|
61
|
+
return loadProperty(homedir, ".config");
|
62
|
+
default:
|
63
|
+
return;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
catch (e) {
|
67
|
+
logger.info(`Failed to load the Visual Studio Code configuration file. Error: ${e.message}`);
|
68
|
+
return;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* Connects to Azure using the credential provided by the VSCode extension 'Azure Account'.
|
73
|
+
* Once the user has logged in via the extension, this credential can share the same refresh token
|
74
|
+
* that is cached by the extension.
|
75
|
+
*
|
76
|
+
* It's a [known issue](https://github.com/Azure/azure-sdk-for-js/issues/20500) that this credential doesn't
|
77
|
+
* work with [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account)
|
78
|
+
* versions newer than **0.9.11**. A long-term fix to this problem is in progress. In the meantime, consider
|
79
|
+
* authenticating with {@link AzureCliCredential}.
|
80
|
+
*/
|
81
|
+
export class VisualStudioCodeCredential {
|
82
|
+
/**
|
83
|
+
* Creates an instance of VisualStudioCodeCredential to use for automatically authenticating via VSCode.
|
84
|
+
*
|
85
|
+
* **Note**: `VisualStudioCodeCredential` is provided by a plugin package:
|
86
|
+
* `@azure/identity-vscode`. If this package is not installed and registered
|
87
|
+
* using the plugin API (`useIdentityPlugin`), then authentication using
|
88
|
+
* `VisualStudioCodeCredential` will not be available.
|
89
|
+
*
|
90
|
+
* @param options - Options for configuring the client which makes the authentication request.
|
91
|
+
*/
|
92
|
+
constructor(options) {
|
93
|
+
// We want to make sure we use the one assigned by the user on the VSCode settings.
|
94
|
+
// Or just `AzureCloud` by default.
|
95
|
+
this.cloudName = (getPropertyFromVSCode("azure.cloud") || "AzureCloud");
|
96
|
+
// Picking an authority host based on the cloud name.
|
97
|
+
const authorityHost = mapVSCodeAuthorityHosts[this.cloudName];
|
98
|
+
this.identityClient = new IdentityClient(Object.assign({ authorityHost }, options));
|
99
|
+
if (options && options.tenantId) {
|
100
|
+
checkTenantId(logger, options.tenantId);
|
101
|
+
this.tenantId = options.tenantId;
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
this.tenantId = CommonTenantId;
|
105
|
+
}
|
106
|
+
this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(options === null || options === void 0 ? void 0 : options.additionallyAllowedTenants);
|
107
|
+
checkUnsupportedTenant(this.tenantId);
|
108
|
+
}
|
109
|
+
/**
|
110
|
+
* Runs preparations for any further getToken request.
|
111
|
+
*/
|
112
|
+
async prepare() {
|
113
|
+
// Attempts to load the tenant from the VSCode configuration file.
|
114
|
+
const settingsTenant = getPropertyFromVSCode("azure.tenant");
|
115
|
+
if (settingsTenant) {
|
116
|
+
this.tenantId = settingsTenant;
|
117
|
+
}
|
118
|
+
checkUnsupportedTenant(this.tenantId);
|
119
|
+
}
|
120
|
+
/**
|
121
|
+
* Runs preparations for any further getToken, but only once.
|
122
|
+
*/
|
123
|
+
prepareOnce() {
|
124
|
+
if (!this.preparePromise) {
|
125
|
+
this.preparePromise = this.prepare();
|
126
|
+
}
|
127
|
+
return this.preparePromise;
|
128
|
+
}
|
129
|
+
/**
|
130
|
+
* Returns the token found by searching VSCode's authentication cache or
|
131
|
+
* returns null if no token could be found.
|
132
|
+
*
|
133
|
+
* @param scopes - The list of scopes for which the token will have access.
|
134
|
+
* @param options - The options used to configure any requests this
|
135
|
+
* `TokenCredential` implementation might make.
|
136
|
+
*/
|
137
|
+
async getToken(scopes, options) {
|
138
|
+
var _a, _b;
|
139
|
+
await this.prepareOnce();
|
140
|
+
const tenantId = processMultiTenantRequest(this.tenantId, options, this.additionallyAllowedTenantIds, logger) || this.tenantId;
|
141
|
+
if (findCredentials === undefined) {
|
142
|
+
throw new CredentialUnavailableError([
|
143
|
+
"No implementation of `VisualStudioCodeCredential` is available.",
|
144
|
+
"You must install the identity-vscode plugin package (`npm install --save-dev @azure/identity-vscode`)",
|
145
|
+
"and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling",
|
146
|
+
"`useIdentityPlugin(vsCodePlugin)` before creating a `VisualStudioCodeCredential`.",
|
147
|
+
"To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.",
|
148
|
+
].join(" "));
|
149
|
+
}
|
150
|
+
let scopeString = typeof scopes === "string" ? scopes : scopes.join(" ");
|
151
|
+
// Check to make sure the scope we get back is a valid scope
|
152
|
+
if (!scopeString.match(/^[0-9a-zA-Z-.:/]+$/)) {
|
153
|
+
const error = new Error("Invalid scope was specified by the user or calling client");
|
154
|
+
logger.getToken.info(formatError(scopes, error));
|
155
|
+
throw error;
|
156
|
+
}
|
157
|
+
if (scopeString.indexOf("offline_access") < 0) {
|
158
|
+
scopeString += " offline_access";
|
159
|
+
}
|
160
|
+
// findCredentials returns an array similar to:
|
161
|
+
// [
|
162
|
+
// {
|
163
|
+
// account: "",
|
164
|
+
// password: "",
|
165
|
+
// },
|
166
|
+
// /* ... */
|
167
|
+
// ]
|
168
|
+
const credentials = await findCredentials();
|
169
|
+
// If we can't find the credential based on the name, we'll pick the first one available.
|
170
|
+
const { password: refreshToken } = (_b = (_a = credentials.find(({ account }) => account === this.cloudName)) !== null && _a !== void 0 ? _a : credentials[0]) !== null && _b !== void 0 ? _b : {};
|
171
|
+
if (refreshToken) {
|
172
|
+
const tokenResponse = await this.identityClient.refreshAccessToken(tenantId, AzureAccountClientId, scopeString, refreshToken, undefined);
|
173
|
+
if (tokenResponse) {
|
174
|
+
logger.getToken.info(formatSuccess(scopes));
|
175
|
+
return tokenResponse.accessToken;
|
176
|
+
}
|
177
|
+
else {
|
178
|
+
const error = new CredentialUnavailableError("Could not retrieve the token associated with Visual Studio Code. Have you connected using the 'Azure Account' extension recently? To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.");
|
179
|
+
logger.getToken.info(formatError(scopes, error));
|
180
|
+
throw error;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
else {
|
184
|
+
const error = new CredentialUnavailableError("Could not retrieve the token associated with Visual Studio Code. Did you connect using the 'Azure Account' extension? To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.");
|
185
|
+
logger.getToken.info(formatError(scopes, error));
|
186
|
+
throw error;
|
187
|
+
}
|
188
|
+
}
|
189
|
+
}
|
190
|
+
//# sourceMappingURL=visualStudioCodeCredential.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"visualStudioCodeCredential.js","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredential.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, formatError, formatSuccess } from \"../util/logging.js\";\nimport {\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils.js\";\nimport { AzureAuthorityHosts } from \"../constants.js\";\nimport { CredentialUnavailableError } from \"../errors.js\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport type { VisualStudioCodeCredentialOptions } from \"./visualStudioCodeCredentialOptions.js\";\nimport type { VSCodeCredentialFinder } from \"./visualStudioCodeCredentialPlugin.js\";\nimport { checkTenantId } from \"../util/tenantIdUtils.js\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nconst CommonTenantId = \"common\";\nconst AzureAccountClientId = \"aebc6443-996d-45c2-90f0-388ff96faa56\"; // VSC: 'aebc6443-996d-45c2-90f0-388ff96faa56'\nconst logger = credentialLogger(\"VisualStudioCodeCredential\");\n\nlet findCredentials: VSCodeCredentialFinder | undefined = undefined;\n\nexport const vsCodeCredentialControl = {\n setVsCodeCredentialFinder(finder: VSCodeCredentialFinder): void {\n findCredentials = finder;\n },\n};\n\n// Map of unsupported Tenant IDs and the errors we will be throwing.\nconst unsupportedTenantIds: Record<string, string> = {\n adfs: \"The VisualStudioCodeCredential does not support authentication with ADFS tenants.\",\n};\n\nfunction checkUnsupportedTenant(tenantId: string): void {\n // If the Tenant ID isn't supported, we throw.\n const unsupportedTenantError = unsupportedTenantIds[tenantId];\n if (unsupportedTenantError) {\n throw new CredentialUnavailableError(unsupportedTenantError);\n }\n}\n\ntype VSCodeCloudNames = \"AzureCloud\" | \"AzureChina\" | \"AzureGermanCloud\" | \"AzureUSGovernment\";\n\nconst mapVSCodeAuthorityHosts: Record<VSCodeCloudNames, string> = {\n AzureCloud: AzureAuthorityHosts.AzurePublicCloud,\n AzureChina: AzureAuthorityHosts.AzureChina,\n AzureGermanCloud: AzureAuthorityHosts.AzureGermany,\n AzureUSGovernment: AzureAuthorityHosts.AzureGovernment,\n};\n\n/**\n * Attempts to load a specific property from the VSCode configurations of the current OS.\n * If it fails at any point, returns undefined.\n */\nexport function getPropertyFromVSCode(property: string): string | undefined {\n const settingsPath = [\"User\", \"settings.json\"];\n // Eventually we can add more folders for more versions of VSCode.\n const vsCodeFolder = \"Code\";\n const homedir = os.homedir();\n\n function loadProperty(...pathSegments: string[]): string | undefined {\n const fullPath = path.join(...pathSegments, vsCodeFolder, ...settingsPath);\n const settings = JSON.parse(fs.readFileSync(fullPath, { encoding: \"utf8\" }));\n return settings[property];\n }\n\n try {\n let appData: string;\n switch (process.platform) {\n case \"win32\":\n appData = process.env.APPDATA!;\n return appData ? loadProperty(appData) : undefined;\n case \"darwin\":\n return loadProperty(homedir, \"Library\", \"Application Support\");\n case \"linux\":\n return loadProperty(homedir, \".config\");\n default:\n return;\n }\n } catch (e: any) {\n logger.info(`Failed to load the Visual Studio Code configuration file. Error: ${e.message}`);\n return;\n }\n}\n\n/**\n * Connects to Azure using the credential provided by the VSCode extension 'Azure Account'.\n * Once the user has logged in via the extension, this credential can share the same refresh token\n * that is cached by the extension.\n *\n * It's a [known issue](https://github.com/Azure/azure-sdk-for-js/issues/20500) that this credential doesn't\n * work with [Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account)\n * versions newer than **0.9.11**. A long-term fix to this problem is in progress. In the meantime, consider\n * authenticating with {@link AzureCliCredential}.\n */\nexport class VisualStudioCodeCredential implements TokenCredential {\n private identityClient: IdentityClient;\n private tenantId: string;\n private additionallyAllowedTenantIds: string[];\n private cloudName: VSCodeCloudNames;\n\n /**\n * Creates an instance of VisualStudioCodeCredential to use for automatically authenticating via VSCode.\n *\n * **Note**: `VisualStudioCodeCredential` is provided by a plugin package:\n * `@azure/identity-vscode`. If this package is not installed and registered\n * using the plugin API (`useIdentityPlugin`), then authentication using\n * `VisualStudioCodeCredential` will not be available.\n *\n * @param options - Options for configuring the client which makes the authentication request.\n */\n constructor(options?: VisualStudioCodeCredentialOptions) {\n // We want to make sure we use the one assigned by the user on the VSCode settings.\n // Or just `AzureCloud` by default.\n this.cloudName = (getPropertyFromVSCode(\"azure.cloud\") || \"AzureCloud\") as VSCodeCloudNames;\n\n // Picking an authority host based on the cloud name.\n const authorityHost = mapVSCodeAuthorityHosts[this.cloudName];\n\n this.identityClient = new IdentityClient({\n authorityHost,\n ...options,\n });\n\n if (options && options.tenantId) {\n checkTenantId(logger, options.tenantId);\n this.tenantId = options.tenantId;\n } else {\n this.tenantId = CommonTenantId;\n }\n\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n\n checkUnsupportedTenant(this.tenantId);\n }\n\n /**\n * Runs preparations for any further getToken request.\n */\n private async prepare(): Promise<void> {\n // Attempts to load the tenant from the VSCode configuration file.\n const settingsTenant = getPropertyFromVSCode(\"azure.tenant\");\n if (settingsTenant) {\n this.tenantId = settingsTenant;\n }\n checkUnsupportedTenant(this.tenantId);\n }\n\n /**\n * The promise of the single preparation that will be executed at the first getToken request for an instance of this class.\n */\n private preparePromise: Promise<void> | undefined;\n\n /**\n * Runs preparations for any further getToken, but only once.\n */\n private prepareOnce(): Promise<void> | undefined {\n if (!this.preparePromise) {\n this.preparePromise = this.prepare();\n }\n return this.preparePromise;\n }\n\n /**\n * Returns the token found by searching VSCode's authentication cache or\n * returns null if no token could be found.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * `TokenCredential` implementation might make.\n */\n public async getToken(\n scopes: string | string[],\n options?: GetTokenOptions,\n ): Promise<AccessToken> {\n await this.prepareOnce();\n\n const tenantId =\n processMultiTenantRequest(\n this.tenantId,\n options,\n this.additionallyAllowedTenantIds,\n logger,\n ) || this.tenantId;\n\n if (findCredentials === undefined) {\n throw new CredentialUnavailableError(\n [\n \"No implementation of `VisualStudioCodeCredential` is available.\",\n \"You must install the identity-vscode plugin package (`npm install --save-dev @azure/identity-vscode`)\",\n \"and enable it by importing `useIdentityPlugin` from `@azure/identity` and calling\",\n \"`useIdentityPlugin(vsCodePlugin)` before creating a `VisualStudioCodeCredential`.\",\n \"To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.\",\n ].join(\" \"),\n );\n }\n\n let scopeString = typeof scopes === \"string\" ? scopes : scopes.join(\" \");\n\n // Check to make sure the scope we get back is a valid scope\n if (!scopeString.match(/^[0-9a-zA-Z-.:/]+$/)) {\n const error = new Error(\"Invalid scope was specified by the user or calling client\");\n logger.getToken.info(formatError(scopes, error));\n throw error;\n }\n\n if (scopeString.indexOf(\"offline_access\") < 0) {\n scopeString += \" offline_access\";\n }\n\n // findCredentials returns an array similar to:\n // [\n // {\n // account: \"\",\n // password: \"\",\n // },\n // /* ... */\n // ]\n const credentials = await findCredentials();\n\n // If we can't find the credential based on the name, we'll pick the first one available.\n const { password: refreshToken } =\n credentials.find(({ account }) => account === this.cloudName) ?? credentials[0] ?? {};\n\n if (refreshToken) {\n const tokenResponse = await this.identityClient.refreshAccessToken(\n tenantId,\n AzureAccountClientId,\n scopeString,\n refreshToken,\n undefined,\n );\n\n if (tokenResponse) {\n logger.getToken.info(formatSuccess(scopes));\n return tokenResponse.accessToken;\n } else {\n const error = new CredentialUnavailableError(\n \"Could not retrieve the token associated with Visual Studio Code. Have you connected using the 'Azure Account' extension recently? To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.\",\n );\n logger.getToken.info(formatError(scopes, error));\n throw error;\n }\n } else {\n const error = new CredentialUnavailableError(\n \"Could not retrieve the token associated with Visual Studio Code. Did you connect using the 'Azure Account' extension? To troubleshoot, visit https://aka.ms/azsdk/js/identity/vscodecredential/troubleshoot.\",\n );\n logger.getToken.info(formatError(scopes, error));\n throw error;\n }\n }\n}\n"]}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
|
2
|
+
/**
|
3
|
+
* Provides options to configure the Visual Studio Code credential.
|
4
|
+
*/
|
5
|
+
export interface VisualStudioCodeCredentialOptions extends MultiTenantTokenCredentialOptions {
|
6
|
+
/**
|
7
|
+
* Optionally pass in a Tenant ID to be used as part of the credential
|
8
|
+
*/
|
9
|
+
tenantId?: string;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=visualStudioCodeCredentialOptions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"visualStudioCodeCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,iCAAiC;IAC1F;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"visualStudioCodeCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Provides options to configure the Visual Studio Code credential.\n */\nexport interface VisualStudioCodeCredentialOptions extends MultiTenantTokenCredentialOptions {\n /**\n * Optionally pass in a Tenant ID to be used as part of the credential\n */\n tenantId?: string;\n}\n"]}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* A function that searches for credentials in the Visual Studio Code credential store.
|
3
|
+
*
|
4
|
+
* @returns an array of credentials (username and password)
|
5
|
+
* @internal
|
6
|
+
*/
|
7
|
+
export type VSCodeCredentialFinder = () => Promise<Array<{
|
8
|
+
account: string;
|
9
|
+
password: string;
|
10
|
+
}>>;
|
11
|
+
//# sourceMappingURL=visualStudioCodeCredentialPlugin.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"visualStudioCodeCredentialPlugin.d.ts","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredentialPlugin.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"visualStudioCodeCredentialPlugin.js","sourceRoot":"","sources":["../../../src/credentials/visualStudioCodeCredentialPlugin.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A function that searches for credentials in the Visual Studio Code credential store.\n *\n * @returns an array of credentials (username and password)\n * @internal\n */\nexport type VSCodeCredentialFinder = () => Promise<Array<{ account: string; password: string }>>;\n"]}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
|
2
|
+
import type { WorkloadIdentityCredentialOptions } from "./workloadIdentityCredentialOptions.js";
|
3
|
+
/**
|
4
|
+
* Contains the list of all supported environment variable names so that an
|
5
|
+
* appropriate error message can be generated when no credentials can be
|
6
|
+
* configured.
|
7
|
+
*
|
8
|
+
* @internal
|
9
|
+
*/
|
10
|
+
export declare const SupportedWorkloadEnvironmentVariables: string[];
|
11
|
+
/**
|
12
|
+
* Workload Identity authentication is a feature in Azure that allows applications running on virtual machines (VMs)
|
13
|
+
* to access other Azure resources without the need for a service principal or managed identity. With Workload Identity
|
14
|
+
* authentication, applications authenticate themselves using their own identity, rather than using a shared service
|
15
|
+
* principal or managed identity. Under the hood, Workload Identity authentication uses the concept of Service Account
|
16
|
+
* Credentials (SACs), which are automatically created by Azure and stored securely in the VM. By using Workload
|
17
|
+
* Identity authentication, you can avoid the need to manage and rotate service principals or managed identities for
|
18
|
+
* each application on each VM. Additionally, because SACs are created automatically and managed by Azure, you don't
|
19
|
+
* need to worry about storing and securing sensitive credentials themselves.
|
20
|
+
* The WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Azure Kubernetes and acquires
|
21
|
+
* a token using the SACs available in the Azure Kubernetes environment.
|
22
|
+
* Refer to <a href="https://learn.microsoft.com/azure/aks/workload-identity-overview">Microsoft Entra
|
23
|
+
* Workload ID</a> for more information.
|
24
|
+
*/
|
25
|
+
export declare class WorkloadIdentityCredential implements TokenCredential {
|
26
|
+
private client;
|
27
|
+
private azureFederatedTokenFileContent;
|
28
|
+
private cacheDate;
|
29
|
+
private federatedTokenFilePath;
|
30
|
+
/**
|
31
|
+
* WorkloadIdentityCredential supports Microsoft Entra Workload ID on Kubernetes.
|
32
|
+
*
|
33
|
+
* @param options - The identity client options to use for authentication.
|
34
|
+
*/
|
35
|
+
constructor(options?: WorkloadIdentityCredentialOptions);
|
36
|
+
/**
|
37
|
+
* Authenticates with Microsoft Entra ID and returns an access token if successful.
|
38
|
+
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
39
|
+
*
|
40
|
+
* @param scopes - The list of scopes for which the token will have access.
|
41
|
+
* @param options - The options used to configure any requests this
|
42
|
+
* TokenCredential implementation might make.
|
43
|
+
*/
|
44
|
+
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken | null>;
|
45
|
+
private readFileContents;
|
46
|
+
}
|
47
|
+
//# sourceMappingURL=workloadIdentityCredential.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"workloadIdentityCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAKhG;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,UAIjD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,qBAAa,0BAA2B,YAAW,eAAe;IAChE,OAAO,CAAC,MAAM,CAAwC;IACtD,OAAO,CAAC,8BAA8B,CAAiC;IACvE,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,sBAAsB,CAAqB;IAEnD;;;;OAIG;gBACS,OAAO,CAAC,EAAE,iCAAiC;IA6CvD;;;;;;;OAOG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;YAchB,gBAAgB;CAwB/B"}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import { credentialLogger, processEnvVars } from "../util/logging.js";
|
4
|
+
import { ClientAssertionCredential } from "./clientAssertionCredential.js";
|
5
|
+
import { CredentialUnavailableError } from "../errors.js";
|
6
|
+
import { checkTenantId } from "../util/tenantIdUtils.js";
|
7
|
+
import { readFile } from "node:fs/promises";
|
8
|
+
const credentialName = "WorkloadIdentityCredential";
|
9
|
+
/**
|
10
|
+
* Contains the list of all supported environment variable names so that an
|
11
|
+
* appropriate error message can be generated when no credentials can be
|
12
|
+
* configured.
|
13
|
+
*
|
14
|
+
* @internal
|
15
|
+
*/
|
16
|
+
export const SupportedWorkloadEnvironmentVariables = [
|
17
|
+
"AZURE_TENANT_ID",
|
18
|
+
"AZURE_CLIENT_ID",
|
19
|
+
"AZURE_FEDERATED_TOKEN_FILE",
|
20
|
+
];
|
21
|
+
const logger = credentialLogger(credentialName);
|
22
|
+
/**
|
23
|
+
* Workload Identity authentication is a feature in Azure that allows applications running on virtual machines (VMs)
|
24
|
+
* to access other Azure resources without the need for a service principal or managed identity. With Workload Identity
|
25
|
+
* authentication, applications authenticate themselves using their own identity, rather than using a shared service
|
26
|
+
* principal or managed identity. Under the hood, Workload Identity authentication uses the concept of Service Account
|
27
|
+
* Credentials (SACs), which are automatically created by Azure and stored securely in the VM. By using Workload
|
28
|
+
* Identity authentication, you can avoid the need to manage and rotate service principals or managed identities for
|
29
|
+
* each application on each VM. Additionally, because SACs are created automatically and managed by Azure, you don't
|
30
|
+
* need to worry about storing and securing sensitive credentials themselves.
|
31
|
+
* The WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Azure Kubernetes and acquires
|
32
|
+
* a token using the SACs available in the Azure Kubernetes environment.
|
33
|
+
* Refer to <a href="https://learn.microsoft.com/azure/aks/workload-identity-overview">Microsoft Entra
|
34
|
+
* Workload ID</a> for more information.
|
35
|
+
*/
|
36
|
+
export class WorkloadIdentityCredential {
|
37
|
+
/**
|
38
|
+
* WorkloadIdentityCredential supports Microsoft Entra Workload ID on Kubernetes.
|
39
|
+
*
|
40
|
+
* @param options - The identity client options to use for authentication.
|
41
|
+
*/
|
42
|
+
constructor(options) {
|
43
|
+
this.azureFederatedTokenFileContent = undefined;
|
44
|
+
this.cacheDate = undefined;
|
45
|
+
// Logging environment variables for error details
|
46
|
+
const assignedEnv = processEnvVars(SupportedWorkloadEnvironmentVariables).assigned.join(", ");
|
47
|
+
logger.info(`Found the following environment variables: ${assignedEnv}`);
|
48
|
+
const workloadIdentityCredentialOptions = options !== null && options !== void 0 ? options : {};
|
49
|
+
const tenantId = workloadIdentityCredentialOptions.tenantId || process.env.AZURE_TENANT_ID;
|
50
|
+
const clientId = workloadIdentityCredentialOptions.clientId || process.env.AZURE_CLIENT_ID;
|
51
|
+
this.federatedTokenFilePath =
|
52
|
+
workloadIdentityCredentialOptions.tokenFilePath || process.env.AZURE_FEDERATED_TOKEN_FILE;
|
53
|
+
if (tenantId) {
|
54
|
+
checkTenantId(logger, tenantId);
|
55
|
+
}
|
56
|
+
if (!clientId) {
|
57
|
+
throw new CredentialUnavailableError(`${credentialName}: is unavailable. clientId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_CLIENT_ID".
|
58
|
+
See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);
|
59
|
+
}
|
60
|
+
if (!tenantId) {
|
61
|
+
throw new CredentialUnavailableError(`${credentialName}: is unavailable. tenantId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_TENANT_ID".
|
62
|
+
See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);
|
63
|
+
}
|
64
|
+
if (!this.federatedTokenFilePath) {
|
65
|
+
throw new CredentialUnavailableError(`${credentialName}: is unavailable. federatedTokenFilePath is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - "AZURE_FEDERATED_TOKEN_FILE".
|
66
|
+
See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`);
|
67
|
+
}
|
68
|
+
logger.info(`Invoking ClientAssertionCredential with tenant ID: ${tenantId}, clientId: ${workloadIdentityCredentialOptions.clientId} and federated token path: [REDACTED]`);
|
69
|
+
this.client = new ClientAssertionCredential(tenantId, clientId, this.readFileContents.bind(this), options);
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* Authenticates with Microsoft Entra ID and returns an access token if successful.
|
73
|
+
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
74
|
+
*
|
75
|
+
* @param scopes - The list of scopes for which the token will have access.
|
76
|
+
* @param options - The options used to configure any requests this
|
77
|
+
* TokenCredential implementation might make.
|
78
|
+
*/
|
79
|
+
async getToken(scopes, options) {
|
80
|
+
if (!this.client) {
|
81
|
+
const errorMessage = `${credentialName}: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters.
|
82
|
+
In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables -
|
83
|
+
"AZURE_TENANT_ID",
|
84
|
+
"AZURE_CLIENT_ID",
|
85
|
+
"AZURE_FEDERATED_TOKEN_FILE". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`;
|
86
|
+
logger.info(errorMessage);
|
87
|
+
throw new CredentialUnavailableError(errorMessage);
|
88
|
+
}
|
89
|
+
logger.info("Invoking getToken() of Client Assertion Credential");
|
90
|
+
return this.client.getToken(scopes, options);
|
91
|
+
}
|
92
|
+
async readFileContents() {
|
93
|
+
// Cached assertions expire after 5 minutes
|
94
|
+
if (this.cacheDate !== undefined && Date.now() - this.cacheDate >= 1000 * 60 * 5) {
|
95
|
+
this.azureFederatedTokenFileContent = undefined;
|
96
|
+
}
|
97
|
+
if (!this.federatedTokenFilePath) {
|
98
|
+
throw new CredentialUnavailableError(`${credentialName}: is unavailable. Invalid file path provided ${this.federatedTokenFilePath}.`);
|
99
|
+
}
|
100
|
+
if (!this.azureFederatedTokenFileContent) {
|
101
|
+
const file = await readFile(this.federatedTokenFilePath, "utf8");
|
102
|
+
const value = file.trim();
|
103
|
+
if (!value) {
|
104
|
+
throw new CredentialUnavailableError(`${credentialName}: is unavailable. No content on the file ${this.federatedTokenFilePath}.`);
|
105
|
+
}
|
106
|
+
else {
|
107
|
+
this.azureFederatedTokenFileContent = value;
|
108
|
+
this.cacheDate = Date.now();
|
109
|
+
}
|
110
|
+
}
|
111
|
+
return this.azureFederatedTokenFileContent;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
//# sourceMappingURL=workloadIdentityCredential.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"workloadIdentityCredential.js","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredential.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AccessToken, GetTokenOptions, TokenCredential } from \"@azure/core-auth\";\nimport { credentialLogger, processEnvVars } from \"../util/logging.js\";\n\nimport { ClientAssertionCredential } from \"./clientAssertionCredential.js\";\nimport { CredentialUnavailableError } from \"../errors.js\";\nimport type { WorkloadIdentityCredentialOptions } from \"./workloadIdentityCredentialOptions.js\";\nimport { checkTenantId } from \"../util/tenantIdUtils.js\";\nimport { readFile } from \"node:fs/promises\";\n\nconst credentialName = \"WorkloadIdentityCredential\";\n/**\n * Contains the list of all supported environment variable names so that an\n * appropriate error message can be generated when no credentials can be\n * configured.\n *\n * @internal\n */\nexport const SupportedWorkloadEnvironmentVariables = [\n \"AZURE_TENANT_ID\",\n \"AZURE_CLIENT_ID\",\n \"AZURE_FEDERATED_TOKEN_FILE\",\n];\nconst logger = credentialLogger(credentialName);\n/**\n * Workload Identity authentication is a feature in Azure that allows applications running on virtual machines (VMs)\n * to access other Azure resources without the need for a service principal or managed identity. With Workload Identity\n * authentication, applications authenticate themselves using their own identity, rather than using a shared service\n * principal or managed identity. Under the hood, Workload Identity authentication uses the concept of Service Account\n * Credentials (SACs), which are automatically created by Azure and stored securely in the VM. By using Workload\n * Identity authentication, you can avoid the need to manage and rotate service principals or managed identities for\n * each application on each VM. Additionally, because SACs are created automatically and managed by Azure, you don't\n * need to worry about storing and securing sensitive credentials themselves.\n * The WorkloadIdentityCredential supports Microsoft Entra Workload ID authentication on Azure Kubernetes and acquires\n * a token using the SACs available in the Azure Kubernetes environment.\n * Refer to <a href=\"https://learn.microsoft.com/azure/aks/workload-identity-overview\">Microsoft Entra\n * Workload ID</a> for more information.\n */\nexport class WorkloadIdentityCredential implements TokenCredential {\n private client: ClientAssertionCredential | undefined;\n private azureFederatedTokenFileContent: string | undefined = undefined;\n private cacheDate: number | undefined = undefined;\n private federatedTokenFilePath: string | undefined;\n\n /**\n * WorkloadIdentityCredential supports Microsoft Entra Workload ID on Kubernetes.\n *\n * @param options - The identity client options to use for authentication.\n */\n constructor(options?: WorkloadIdentityCredentialOptions) {\n // Logging environment variables for error details\n const assignedEnv = processEnvVars(SupportedWorkloadEnvironmentVariables).assigned.join(\", \");\n logger.info(`Found the following environment variables: ${assignedEnv}`);\n\n const workloadIdentityCredentialOptions = options ?? {};\n const tenantId = workloadIdentityCredentialOptions.tenantId || process.env.AZURE_TENANT_ID;\n const clientId = workloadIdentityCredentialOptions.clientId || process.env.AZURE_CLIENT_ID;\n this.federatedTokenFilePath =\n workloadIdentityCredentialOptions.tokenFilePath || process.env.AZURE_FEDERATED_TOKEN_FILE;\n if (tenantId) {\n checkTenantId(logger, tenantId);\n }\n if (!clientId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. clientId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - \"AZURE_CLIENT_ID\".\n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`,\n );\n }\n\n if (!tenantId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. tenantId is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - \"AZURE_TENANT_ID\".\n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`,\n );\n }\n\n if (!this.federatedTokenFilePath) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. federatedTokenFilePath is a required parameter. In DefaultAzureCredential and ManagedIdentityCredential, this can be provided as an environment variable - \"AZURE_FEDERATED_TOKEN_FILE\".\n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`,\n );\n }\n\n logger.info(\n `Invoking ClientAssertionCredential with tenant ID: ${tenantId}, clientId: ${workloadIdentityCredentialOptions.clientId} and federated token path: [REDACTED]`,\n );\n this.client = new ClientAssertionCredential(\n tenantId,\n clientId,\n this.readFileContents.bind(this),\n options,\n );\n }\n\n /**\n * Authenticates with Microsoft Entra ID and returns an access token if successful.\n * If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.\n *\n * @param scopes - The list of scopes for which the token will have access.\n * @param options - The options used to configure any requests this\n * TokenCredential implementation might make.\n */\n public async getToken(\n scopes: string | string[],\n options?: GetTokenOptions,\n ): Promise<AccessToken | null> {\n if (!this.client) {\n const errorMessage = `${credentialName}: is unavailable. tenantId, clientId, and federatedTokenFilePath are required parameters. \n In DefaultAzureCredential and ManagedIdentityCredential, these can be provided as environment variables - \n \"AZURE_TENANT_ID\",\n \"AZURE_CLIENT_ID\",\n \"AZURE_FEDERATED_TOKEN_FILE\". See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/workloadidentitycredential/troubleshoot`;\n logger.info(errorMessage);\n throw new CredentialUnavailableError(errorMessage);\n }\n logger.info(\"Invoking getToken() of Client Assertion Credential\");\n return this.client.getToken(scopes, options);\n }\n\n private async readFileContents(): Promise<string> {\n // Cached assertions expire after 5 minutes\n if (this.cacheDate !== undefined && Date.now() - this.cacheDate >= 1000 * 60 * 5) {\n this.azureFederatedTokenFileContent = undefined;\n }\n if (!this.federatedTokenFilePath) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. Invalid file path provided ${this.federatedTokenFilePath}.`,\n );\n }\n if (!this.azureFederatedTokenFileContent) {\n const file = await readFile(this.federatedTokenFilePath, \"utf8\");\n const value = file.trim();\n if (!value) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. No content on the file ${this.federatedTokenFilePath}.`,\n );\n } else {\n this.azureFederatedTokenFileContent = value;\n this.cacheDate = Date.now();\n }\n }\n return this.azureFederatedTokenFileContent;\n }\n}\n"]}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { AuthorityValidationOptions } from "./authorityValidationOptions.js";
|
2
|
+
import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
|
3
|
+
/**
|
4
|
+
* Options for the {@link WorkloadIdentityCredential}
|
5
|
+
*/
|
6
|
+
export interface WorkloadIdentityCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
7
|
+
/**
|
8
|
+
* ID of the application's Microsoft Entra tenant. Also called its directory ID.
|
9
|
+
*/
|
10
|
+
tenantId?: string;
|
11
|
+
/**
|
12
|
+
* The client ID of a Microsoft Entra app registration.
|
13
|
+
*/
|
14
|
+
clientId?: string;
|
15
|
+
/**
|
16
|
+
* The path to a file containing a Kubernetes service account token that authenticates the identity.
|
17
|
+
*/
|
18
|
+
tokenFilePath?: string;
|
19
|
+
}
|
20
|
+
//# sourceMappingURL=workloadIdentityCredentialOptions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"workloadIdentityCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,iCACf,SAAQ,iCAAiC,EACvC,0BAA0B;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"workloadIdentityCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/workloadIdentityCredentialOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AuthorityValidationOptions } from \"./authorityValidationOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Options for the {@link WorkloadIdentityCredential}\n */\nexport interface WorkloadIdentityCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n AuthorityValidationOptions {\n /**\n * ID of the application's Microsoft Entra tenant. Also called its directory ID.\n */\n tenantId?: string;\n /**\n * The client ID of a Microsoft Entra app registration.\n */\n clientId?: string;\n /**\n * The path to a file containing a Kubernetes service account token that authenticates the identity.\n */\n tokenFilePath?: string;\n}\n"]}
|