@depup/azure__identity 4.13.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/changes.json +50 -0
- 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 +260 -0
- package/dist/browser/client/identityClient.js.map +1 -0
- package/dist/browser/constants.d.ts +69 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/constants.js +75 -0
- package/dist/browser/constants.js.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/authorityValidationOptions.js +4 -0
- package/dist/browser/credentials/authorityValidationOptions.js.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 +4 -0
- package/dist/browser/credentials/authorizationCodeCredentialOptions.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 +4 -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 +4 -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 +4 -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 +4 -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 +2 -0
- package/dist/browser/credentials/brokerAuthOptions.js.map +1 -0
- package/dist/browser/credentials/brokerCredential.d.ts +35 -0
- package/dist/browser/credentials/brokerCredential.d.ts.map +1 -0
- package/dist/browser/credentials/brokerCredential.js +69 -0
- package/dist/browser/credentials/brokerCredential.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/browserCustomizationOptions.js +4 -0
- package/dist/browser/credentials/browserCustomizationOptions.js.map +1 -0
- package/dist/browser/credentials/chainedTokenCredential.d.ts +51 -0
- package/dist/browser/credentials/chainedTokenCredential.d.ts.map +1 -0
- package/dist/browser/credentials/chainedTokenCredential.js +92 -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 +4 -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/clientCertificateCredentialModels.d.ts +32 -0
- package/dist/browser/credentials/clientCertificateCredentialModels.d.ts.map +1 -0
- package/dist/browser/credentials/clientCertificateCredentialModels.js +4 -0
- package/dist/browser/credentials/clientCertificateCredentialModels.js.map +1 -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 +4 -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 +88 -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 +4 -0
- package/dist/browser/credentials/clientSecretCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/credentialPersistenceOptions.d.ts +30 -0
- package/dist/browser/credentials/credentialPersistenceOptions.d.ts.map +1 -0
- package/dist/browser/credentials/credentialPersistenceOptions.js +4 -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/defaultAzureCredentialFunctions.d.ts +64 -0
- package/dist/browser/credentials/defaultAzureCredentialFunctions.d.ts.map +1 -0
- package/dist/browser/credentials/defaultAzureCredentialFunctions.js +147 -0
- package/dist/browser/credentials/defaultAzureCredentialFunctions.js.map +1 -0
- package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts +61 -0
- package/dist/browser/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/defaultAzureCredentialOptions.js +4 -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 +4 -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 +4 -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 +99 -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 +4 -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 +4 -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 +97 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +13 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/imdsRetryPolicy.js +43 -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 +4 -0
- package/dist/browser/credentials/managedIdentityCredential/models.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/options.d.ts +52 -0
- package/dist/browser/credentials/managedIdentityCredential/options.d.ts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/options.js +4 -0
- package/dist/browser/credentials/managedIdentityCredential/options.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 +38 -0
- package/dist/browser/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/utils.d.ts +37 -0
- package/dist/browser/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
- package/dist/browser/credentials/managedIdentityCredential/utils.js +81 -0
- package/dist/browser/credentials/managedIdentityCredential/utils.js.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 +4 -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 +4 -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 +43 -0
- package/dist/browser/credentials/usernamePasswordCredential.js +86 -0
- package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts +10 -0
- package/dist/browser/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/usernamePasswordCredentialOptions.js +4 -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 +20 -0
- package/dist/browser/credentials/visualStudioCodeCredential.js +32 -0
- package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts +12 -0
- package/dist/browser/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredentialOptions.js +4 -0
- package/dist/browser/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts +12 -0
- package/dist/browser/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
- package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js +4 -0
- package/dist/browser/credentials/visualStudioCodeCredentialPlugin.js.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 +4 -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/errors.js +139 -0
- package/dist/browser/errors.js.map +1 -0
- package/dist/browser/index.d.ts +61 -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/msalBrowserCommon.d.ts +19 -0
- package/dist/browser/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
- package/dist/browser/msal/browserFlows/msalBrowserCommon.js +261 -0
- package/dist/browser/msal/browserFlows/msalBrowserCommon.js.map +1 -0
- package/dist/browser/msal/browserFlows/msalBrowserOptions.d.ts +87 -0
- package/dist/browser/msal/browserFlows/msalBrowserOptions.d.ts.map +1 -0
- package/dist/browser/msal/browserFlows/msalBrowserOptions.js +4 -0
- package/dist/browser/msal/browserFlows/msalBrowserOptions.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 +4 -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/brokerOptions.js +2 -0
- package/dist/browser/msal/nodeFlows/brokerOptions.js.map +1 -0
- package/dist/browser/msal/nodeFlows/msalClient.d.ts +199 -0
- package/dist/browser/msal/nodeFlows/msalClient.d.ts.map +1 -0
- package/dist/browser/msal/nodeFlows/msalClient.js +499 -0
- package/dist/browser/msal/nodeFlows/msalClient.js.map +1 -0
- package/dist/browser/msal/nodeFlows/msalPlugins.d.ts +109 -0
- package/dist/browser/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
- package/dist/browser/msal/nodeFlows/msalPlugins.js +160 -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/nodeFlows/tokenCachePersistenceOptions.js +4 -0
- package/dist/browser/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
- package/dist/browser/msal/types.d.ts +93 -0
- package/dist/browser/msal/types.d.ts.map +1 -0
- package/dist/browser/msal/types.js +4 -0
- package/dist/browser/msal/types.js.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 +233 -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 +4 -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/regionalAuthority.js +139 -0
- package/dist/browser/regionalAuthority.js.map +1 -0
- package/dist/browser/tokenCredentialOptions.d.ts +28 -0
- package/dist/browser/tokenCredentialOptions.d.ts.map +1 -0
- package/dist/browser/tokenCredentialOptions.js +4 -0
- package/dist/browser/tokenCredentialOptions.js.map +1 -0
- package/dist/browser/tokenProvider.d.ts +39 -0
- package/dist/browser/tokenProvider.d.ts.map +1 -0
- package/dist/browser/tokenProvider.js +52 -0
- package/dist/browser/tokenProvider.js.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/identityTokenEndpoint.js +11 -0
- package/dist/browser/util/identityTokenEndpoint.js.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/logging.js +98 -0
- package/dist/browser/util/logging.js.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 +28 -0
- package/dist/browser/util/processUtils.d.ts +13 -0
- package/dist/browser/util/processUtils.d.ts.map +1 -0
- package/dist/browser/util/processUtils.js +32 -0
- package/dist/browser/util/processUtils.js.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 +16 -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 +265 -0
- package/dist/commonjs/client/identityClient.js.map +1 -0
- package/dist/commonjs/constants.d.ts +69 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +78 -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 +78 -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/azureCliCredential.d.ts +75 -0
- package/dist/commonjs/credentials/azureCliCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureCliCredential.js +224 -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 +81 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azureDeveloperCliCredential.js +210 -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 +150 -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 +76 -0
- package/dist/commonjs/credentials/azurePowerShellCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/azurePowerShellCredential.js +264 -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/brokerCredential.d.ts +35 -0
- package/dist/commonjs/credentials/brokerCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/brokerCredential.js +73 -0
- package/dist/commonjs/credentials/brokerCredential.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 +51 -0
- package/dist/commonjs/credentials/chainedTokenCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/chainedTokenCredential.js +96 -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 +68 -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 +73 -0
- package/dist/commonjs/credentials/clientCertificateCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientCertificateCredential.js +143 -0
- package/dist/commonjs/credentials/clientCertificateCredential.js.map +1 -0
- package/dist/commonjs/credentials/clientCertificateCredentialModels.d.ts +32 -0
- package/dist/commonjs/credentials/clientCertificateCredentialModels.d.ts.map +1 -0
- package/dist/commonjs/credentials/clientCertificateCredentialModels.js +5 -0
- package/dist/commonjs/credentials/clientCertificateCredentialModels.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 +72 -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 +30 -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 +70 -0
- package/dist/commonjs/credentials/defaultAzureCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredential.js +167 -0
- package/dist/commonjs/credentials/defaultAzureCredential.js.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredentialFunctions.d.ts +64 -0
- package/dist/commonjs/credentials/defaultAzureCredentialFunctions.d.ts.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js +157 -0
- package/dist/commonjs/credentials/defaultAzureCredentialFunctions.js.map +1 -0
- package/dist/commonjs/credentials/defaultAzureCredentialOptions.d.ts +61 -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 +110 -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 +51 -0
- package/dist/commonjs/credentials/environmentCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/environmentCredential.js +133 -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 +114 -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 +100 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +13 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js +46 -0
- package/dist/commonjs/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts +62 -0
- package/dist/commonjs/credentials/managedIdentityCredential/index.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/index.js +257 -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/options.d.ts +52 -0
- package/dist/commonjs/credentials/managedIdentityCredential/options.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/options.js +5 -0
- package/dist/commonjs/credentials/managedIdentityCredential/options.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 +41 -0
- package/dist/commonjs/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts +37 -0
- package/dist/commonjs/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
- package/dist/commonjs/credentials/managedIdentityCredential/utils.js +87 -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 +105 -0
- package/dist/commonjs/credentials/onBehalfOfCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/onBehalfOfCredential.js +134 -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 +42 -0
- package/dist/commonjs/credentials/usernamePasswordCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/usernamePasswordCredential.js +80 -0
- package/dist/commonjs/credentials/usernamePasswordCredential.js.map +1 -0
- package/dist/commonjs/credentials/usernamePasswordCredentialOptions.d.ts +10 -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 +55 -0
- package/dist/commonjs/credentials/visualStudioCodeCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredential.js +145 -0
- package/dist/commonjs/credentials/visualStudioCodeCredential.js.map +1 -0
- package/dist/commonjs/credentials/visualStudioCodeCredentialOptions.d.ts +12 -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 +12 -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 +120 -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 +146 -0
- package/dist/commonjs/errors.js.map +1 -0
- package/dist/commonjs/index.d.ts +61 -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/msalBrowserCommon.d.ts +19 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js +265 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserCommon.js.map +1 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts +87 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserOptions.d.ts.map +1 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserOptions.js +5 -0
- package/dist/commonjs/msal/browserFlows/msalBrowserOptions.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 +199 -0
- package/dist/commonjs/msal/nodeFlows/msalClient.d.ts.map +1 -0
- package/dist/commonjs/msal/nodeFlows/msalClient.js +504 -0
- package/dist/commonjs/msal/nodeFlows/msalClient.js.map +1 -0
- package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts +109 -0
- package/dist/commonjs/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
- package/dist/commonjs/msal/nodeFlows/msalPlugins.js +165 -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 +93 -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 +248 -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 +44 -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 +143 -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 +39 -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 +107 -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 +37 -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 +19 -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 +260 -0
- package/dist/esm/client/identityClient.js.map +1 -0
- package/dist/esm/constants.d.ts +69 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +75 -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 +74 -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/azureCliCredential.d.ts +75 -0
- package/dist/esm/credentials/azureCliCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azureCliCredential.js +219 -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 +81 -0
- package/dist/esm/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azureDeveloperCliCredential.js +205 -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 +145 -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 +76 -0
- package/dist/esm/credentials/azurePowerShellCredential.d.ts.map +1 -0
- package/dist/esm/credentials/azurePowerShellCredential.js +258 -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/brokerCredential.d.ts +35 -0
- package/dist/esm/credentials/brokerCredential.d.ts.map +1 -0
- package/dist/esm/credentials/brokerCredential.js +69 -0
- package/dist/esm/credentials/brokerCredential.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 +51 -0
- package/dist/esm/credentials/chainedTokenCredential.d.ts.map +1 -0
- package/dist/esm/credentials/chainedTokenCredential.js +92 -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 +64 -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 +73 -0
- package/dist/esm/credentials/clientCertificateCredential.d.ts.map +1 -0
- package/dist/esm/credentials/clientCertificateCredential.js +138 -0
- package/dist/esm/credentials/clientCertificateCredential.js.map +1 -0
- package/dist/esm/credentials/clientCertificateCredentialModels.d.ts +32 -0
- package/dist/esm/credentials/clientCertificateCredentialModels.d.ts.map +1 -0
- package/dist/esm/credentials/clientCertificateCredentialModels.js +4 -0
- package/dist/esm/credentials/clientCertificateCredentialModels.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 +68 -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 +30 -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 +70 -0
- package/dist/esm/credentials/defaultAzureCredential.d.ts.map +1 -0
- package/dist/esm/credentials/defaultAzureCredential.js +162 -0
- package/dist/esm/credentials/defaultAzureCredential.js.map +1 -0
- package/dist/esm/credentials/defaultAzureCredentialFunctions.d.ts +64 -0
- package/dist/esm/credentials/defaultAzureCredentialFunctions.d.ts.map +1 -0
- package/dist/esm/credentials/defaultAzureCredentialFunctions.js +147 -0
- package/dist/esm/credentials/defaultAzureCredentialFunctions.js.map +1 -0
- package/dist/esm/credentials/defaultAzureCredentialOptions.d.ts +61 -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 +105 -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 +51 -0
- package/dist/esm/credentials/environmentCredential.d.ts.map +1 -0
- package/dist/esm/credentials/environmentCredential.js +128 -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 +110 -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 +97 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +13 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js +43 -0
- package/dist/esm/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/index.d.ts +62 -0
- package/dist/esm/credentials/managedIdentityCredential/index.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/index.js +253 -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/options.d.ts +52 -0
- package/dist/esm/credentials/managedIdentityCredential/options.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/options.js +4 -0
- package/dist/esm/credentials/managedIdentityCredential/options.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 +38 -0
- package/dist/esm/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/utils.d.ts +37 -0
- package/dist/esm/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
- package/dist/esm/credentials/managedIdentityCredential/utils.js +81 -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 +105 -0
- package/dist/esm/credentials/onBehalfOfCredential.d.ts.map +1 -0
- package/dist/esm/credentials/onBehalfOfCredential.js +130 -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 +42 -0
- package/dist/esm/credentials/usernamePasswordCredential.d.ts.map +1 -0
- package/dist/esm/credentials/usernamePasswordCredential.js +76 -0
- package/dist/esm/credentials/usernamePasswordCredential.js.map +1 -0
- package/dist/esm/credentials/usernamePasswordCredentialOptions.d.ts +10 -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 +55 -0
- package/dist/esm/credentials/visualStudioCodeCredential.d.ts.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredential.js +141 -0
- package/dist/esm/credentials/visualStudioCodeCredential.js.map +1 -0
- package/dist/esm/credentials/visualStudioCodeCredentialOptions.d.ts +12 -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 +12 -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 +116 -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 +139 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/index.d.ts +61 -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/msalBrowserCommon.d.ts +19 -0
- package/dist/esm/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
- package/dist/esm/msal/browserFlows/msalBrowserCommon.js +261 -0
- package/dist/esm/msal/browserFlows/msalBrowserCommon.js.map +1 -0
- package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts +87 -0
- package/dist/esm/msal/browserFlows/msalBrowserOptions.d.ts.map +1 -0
- package/dist/esm/msal/browserFlows/msalBrowserOptions.js +4 -0
- package/dist/esm/msal/browserFlows/msalBrowserOptions.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/msal.js +5 -0
- package/dist/esm/msal/msal.js.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 +199 -0
- package/dist/esm/msal/nodeFlows/msalClient.d.ts.map +1 -0
- package/dist/esm/msal/nodeFlows/msalClient.js +499 -0
- package/dist/esm/msal/nodeFlows/msalClient.js.map +1 -0
- package/dist/esm/msal/nodeFlows/msalPlugins.d.ts +109 -0
- package/dist/esm/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
- package/dist/esm/msal/nodeFlows/msalPlugins.js +160 -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 +93 -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 +233 -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 +41 -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 +139 -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 +39 -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 +98 -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 +34 -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 +16 -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/dist/workerd/client/identityClient.d.ts +65 -0
- package/dist/workerd/client/identityClient.d.ts.map +1 -0
- package/dist/workerd/client/identityClient.js +260 -0
- package/dist/workerd/client/identityClient.js.map +1 -0
- package/dist/workerd/constants.d.ts +69 -0
- package/dist/workerd/constants.d.ts.map +1 -0
- package/dist/workerd/constants.js +75 -0
- package/dist/workerd/constants.js.map +1 -0
- package/dist/workerd/credentials/authorityValidationOptions.d.ts +16 -0
- package/dist/workerd/credentials/authorityValidationOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/authorityValidationOptions.js +4 -0
- package/dist/workerd/credentials/authorityValidationOptions.js.map +1 -0
- package/dist/workerd/credentials/authorizationCodeCredential.d.ts +73 -0
- package/dist/workerd/credentials/authorizationCodeCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/authorizationCodeCredential.js +74 -0
- package/dist/workerd/credentials/authorizationCodeCredential.js.map +1 -0
- package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts +8 -0
- package/dist/workerd/credentials/authorizationCodeCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/authorizationCodeCredentialOptions.js +4 -0
- package/dist/workerd/credentials/authorizationCodeCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/azureCliCredential.d.ts +75 -0
- package/dist/workerd/credentials/azureCliCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/azureCliCredential.js +219 -0
- package/dist/workerd/credentials/azureCliCredential.js.map +1 -0
- package/dist/workerd/credentials/azureCliCredentialOptions.d.ts +20 -0
- package/dist/workerd/credentials/azureCliCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/azureCliCredentialOptions.js +4 -0
- package/dist/workerd/credentials/azureCliCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts +81 -0
- package/dist/workerd/credentials/azureDeveloperCliCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/azureDeveloperCliCredential.js +205 -0
- package/dist/workerd/credentials/azureDeveloperCliCredential.js.map +1 -0
- package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.d.ts +15 -0
- package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.js +4 -0
- package/dist/workerd/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/azurePipelinesCredential.d.ts +38 -0
- package/dist/workerd/credentials/azurePipelinesCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/azurePipelinesCredential.js +145 -0
- package/dist/workerd/credentials/azurePipelinesCredential.js.map +1 -0
- package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts +9 -0
- package/dist/workerd/credentials/azurePipelinesCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/azurePipelinesCredentialOptions.js +4 -0
- package/dist/workerd/credentials/azurePipelinesCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/azurePowerShellCredential.d.ts +76 -0
- package/dist/workerd/credentials/azurePowerShellCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/azurePowerShellCredential.js +258 -0
- package/dist/workerd/credentials/azurePowerShellCredential.js.map +1 -0
- package/dist/workerd/credentials/azurePowerShellCredentialOptions.d.ts +15 -0
- package/dist/workerd/credentials/azurePowerShellCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/azurePowerShellCredentialOptions.js +4 -0
- package/dist/workerd/credentials/azurePowerShellCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/brokerAuthOptions.d.ts +13 -0
- package/dist/workerd/credentials/brokerAuthOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/brokerAuthOptions.js +2 -0
- package/dist/workerd/credentials/brokerAuthOptions.js.map +1 -0
- package/dist/workerd/credentials/brokerCredential.d.ts +35 -0
- package/dist/workerd/credentials/brokerCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/brokerCredential.js +69 -0
- package/dist/workerd/credentials/brokerCredential.js.map +1 -0
- package/dist/workerd/credentials/browserCustomizationOptions.d.ts +19 -0
- package/dist/workerd/credentials/browserCustomizationOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/browserCustomizationOptions.js +4 -0
- package/dist/workerd/credentials/browserCustomizationOptions.js.map +1 -0
- package/dist/workerd/credentials/chainedTokenCredential.d.ts +51 -0
- package/dist/workerd/credentials/chainedTokenCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/chainedTokenCredential.js +92 -0
- package/dist/workerd/credentials/chainedTokenCredential.js.map +1 -0
- package/dist/workerd/credentials/clientAssertionCredential.d.ts +33 -0
- package/dist/workerd/credentials/clientAssertionCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/clientAssertionCredential.js +64 -0
- package/dist/workerd/credentials/clientAssertionCredential.js.map +1 -0
- package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts +9 -0
- package/dist/workerd/credentials/clientAssertionCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/clientAssertionCredentialOptions.js +4 -0
- package/dist/workerd/credentials/clientAssertionCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/clientCertificateCredential.d.ts +73 -0
- package/dist/workerd/credentials/clientCertificateCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/clientCertificateCredential.js +138 -0
- package/dist/workerd/credentials/clientCertificateCredential.js.map +1 -0
- package/dist/workerd/credentials/clientCertificateCredentialModels.d.ts +32 -0
- package/dist/workerd/credentials/clientCertificateCredentialModels.d.ts.map +1 -0
- package/dist/workerd/credentials/clientCertificateCredentialModels.js +4 -0
- package/dist/workerd/credentials/clientCertificateCredentialModels.js.map +1 -0
- package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts +14 -0
- package/dist/workerd/credentials/clientCertificateCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/clientCertificateCredentialOptions.js +4 -0
- package/dist/workerd/credentials/clientCertificateCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/clientSecretCredential.d.ts +37 -0
- package/dist/workerd/credentials/clientSecretCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/clientSecretCredential.js +68 -0
- package/dist/workerd/credentials/clientSecretCredential.js.map +1 -0
- package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts +9 -0
- package/dist/workerd/credentials/clientSecretCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/clientSecretCredentialOptions.js +4 -0
- package/dist/workerd/credentials/clientSecretCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/credentialPersistenceOptions.d.ts +30 -0
- package/dist/workerd/credentials/credentialPersistenceOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/credentialPersistenceOptions.js +4 -0
- package/dist/workerd/credentials/credentialPersistenceOptions.js.map +1 -0
- package/dist/workerd/credentials/defaultAzureCredential.d.ts +70 -0
- package/dist/workerd/credentials/defaultAzureCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/defaultAzureCredential.js +162 -0
- package/dist/workerd/credentials/defaultAzureCredential.js.map +1 -0
- package/dist/workerd/credentials/defaultAzureCredentialFunctions.d.ts +64 -0
- package/dist/workerd/credentials/defaultAzureCredentialFunctions.d.ts.map +1 -0
- package/dist/workerd/credentials/defaultAzureCredentialFunctions.js +147 -0
- package/dist/workerd/credentials/defaultAzureCredentialFunctions.js.map +1 -0
- package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts +61 -0
- package/dist/workerd/credentials/defaultAzureCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/defaultAzureCredentialOptions.js +4 -0
- package/dist/workerd/credentials/defaultAzureCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/deviceCodeCredential.d.ts +67 -0
- package/dist/workerd/credentials/deviceCodeCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/deviceCodeCredential.js +105 -0
- package/dist/workerd/credentials/deviceCodeCredential.js.map +1 -0
- package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts +53 -0
- package/dist/workerd/credentials/deviceCodeCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/deviceCodeCredentialOptions.js +4 -0
- package/dist/workerd/credentials/deviceCodeCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/environmentCredential.d.ts +51 -0
- package/dist/workerd/credentials/environmentCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/environmentCredential.js +128 -0
- package/dist/workerd/credentials/environmentCredential.js.map +1 -0
- package/dist/workerd/credentials/environmentCredentialOptions.d.ts +9 -0
- package/dist/workerd/credentials/environmentCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/environmentCredentialOptions.js +4 -0
- package/dist/workerd/credentials/environmentCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/interactiveBrowserCredential.d.ts +56 -0
- package/dist/workerd/credentials/interactiveBrowserCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/interactiveBrowserCredential.js +110 -0
- package/dist/workerd/credentials/interactiveBrowserCredential.js.map +1 -0
- package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts +77 -0
- package/dist/workerd/credentials/interactiveBrowserCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js +4 -0
- package/dist/workerd/credentials/interactiveBrowserCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/interactiveCredentialOptions.d.ts +25 -0
- package/dist/workerd/credentials/interactiveCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/interactiveCredentialOptions.js +4 -0
- package/dist/workerd/credentials/interactiveCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.d.ts +18 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.d.ts.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.js +97 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsMsi.js.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts +13 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.d.ts.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.js +43 -0
- package/dist/workerd/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/index.d.ts +62 -0
- package/dist/workerd/credentials/managedIdentityCredential/index.d.ts.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/index.js +253 -0
- package/dist/workerd/credentials/managedIdentityCredential/index.js.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/models.d.ts +24 -0
- package/dist/workerd/credentials/managedIdentityCredential/models.d.ts.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/models.js +4 -0
- package/dist/workerd/credentials/managedIdentityCredential/models.js.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/options.d.ts +52 -0
- package/dist/workerd/credentials/managedIdentityCredential/options.d.ts.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/options.js +4 -0
- package/dist/workerd/credentials/managedIdentityCredential/options.js.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts +14 -0
- package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.d.ts.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js +38 -0
- package/dist/workerd/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/utils.d.ts +37 -0
- package/dist/workerd/credentials/managedIdentityCredential/utils.d.ts.map +1 -0
- package/dist/workerd/credentials/managedIdentityCredential/utils.js +81 -0
- package/dist/workerd/credentials/managedIdentityCredential/utils.js.map +1 -0
- package/dist/workerd/credentials/multiTenantTokenCredentialOptions.d.ts +12 -0
- package/dist/workerd/credentials/multiTenantTokenCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/multiTenantTokenCredentialOptions.js +4 -0
- package/dist/workerd/credentials/multiTenantTokenCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/onBehalfOfCredential.d.ts +105 -0
- package/dist/workerd/credentials/onBehalfOfCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/onBehalfOfCredential.js +130 -0
- package/dist/workerd/credentials/onBehalfOfCredential.js.map +1 -0
- package/dist/workerd/credentials/onBehalfOfCredentialOptions.d.ts +76 -0
- package/dist/workerd/credentials/onBehalfOfCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/onBehalfOfCredentialOptions.js +4 -0
- package/dist/workerd/credentials/onBehalfOfCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/usernamePasswordCredential.d.ts +42 -0
- package/dist/workerd/credentials/usernamePasswordCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/usernamePasswordCredential.js +76 -0
- package/dist/workerd/credentials/usernamePasswordCredential.js.map +1 -0
- package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts +10 -0
- package/dist/workerd/credentials/usernamePasswordCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/usernamePasswordCredentialOptions.js +4 -0
- package/dist/workerd/credentials/usernamePasswordCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/visualStudioCodeCredential.d.ts +55 -0
- package/dist/workerd/credentials/visualStudioCodeCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/visualStudioCodeCredential.js +141 -0
- package/dist/workerd/credentials/visualStudioCodeCredential.js.map +1 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialOptions.d.ts +12 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialOptions.js +4 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialOptions.js.map +1 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts +12 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.d.ts.map +1 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js +4 -0
- package/dist/workerd/credentials/visualStudioCodeCredentialPlugin.js.map +1 -0
- package/dist/workerd/credentials/workloadIdentityCredential.d.ts +47 -0
- package/dist/workerd/credentials/workloadIdentityCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/workloadIdentityCredential.js +116 -0
- package/dist/workerd/credentials/workloadIdentityCredential.js.map +1 -0
- package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts +20 -0
- package/dist/workerd/credentials/workloadIdentityCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/workloadIdentityCredentialOptions.js +4 -0
- package/dist/workerd/credentials/workloadIdentityCredentialOptions.js.map +1 -0
- package/dist/workerd/errors.d.ts +139 -0
- package/dist/workerd/errors.d.ts.map +1 -0
- package/dist/workerd/errors.js +139 -0
- package/dist/workerd/errors.js.map +1 -0
- package/dist/workerd/index.d.ts +61 -0
- package/dist/workerd/index.d.ts.map +1 -0
- package/dist/workerd/index.js +34 -0
- package/dist/workerd/index.js.map +1 -0
- package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts +19 -0
- package/dist/workerd/msal/browserFlows/msalBrowserCommon.d.ts.map +1 -0
- package/dist/workerd/msal/browserFlows/msalBrowserCommon.js +261 -0
- package/dist/workerd/msal/browserFlows/msalBrowserCommon.js.map +1 -0
- package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts +87 -0
- package/dist/workerd/msal/browserFlows/msalBrowserOptions.d.ts.map +1 -0
- package/dist/workerd/msal/browserFlows/msalBrowserOptions.js +4 -0
- package/dist/workerd/msal/browserFlows/msalBrowserOptions.js.map +1 -0
- package/dist/workerd/msal/credentials.d.ts +52 -0
- package/dist/workerd/msal/credentials.d.ts.map +1 -0
- package/dist/workerd/msal/credentials.js +4 -0
- package/dist/workerd/msal/credentials.js.map +1 -0
- package/dist/workerd/msal/msal.d.ts +3 -0
- package/dist/workerd/msal/msal.d.ts.map +1 -0
- package/dist/workerd/msal/msal.js +5 -0
- package/dist/workerd/msal/msal.js.map +1 -0
- package/dist/workerd/msal/nodeFlows/brokerOptions.d.ts +44 -0
- package/dist/workerd/msal/nodeFlows/brokerOptions.d.ts.map +1 -0
- package/dist/workerd/msal/nodeFlows/brokerOptions.js +2 -0
- package/dist/workerd/msal/nodeFlows/brokerOptions.js.map +1 -0
- package/dist/workerd/msal/nodeFlows/msalClient.d.ts +199 -0
- package/dist/workerd/msal/nodeFlows/msalClient.d.ts.map +1 -0
- package/dist/workerd/msal/nodeFlows/msalClient.js +499 -0
- package/dist/workerd/msal/nodeFlows/msalClient.js.map +1 -0
- package/dist/workerd/msal/nodeFlows/msalPlugins.d.ts +109 -0
- package/dist/workerd/msal/nodeFlows/msalPlugins.d.ts.map +1 -0
- package/dist/workerd/msal/nodeFlows/msalPlugins.js +160 -0
- package/dist/workerd/msal/nodeFlows/msalPlugins.js.map +1 -0
- package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.d.ts +24 -0
- package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.d.ts.map +1 -0
- package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.js +4 -0
- package/dist/workerd/msal/nodeFlows/tokenCachePersistenceOptions.js.map +1 -0
- package/dist/workerd/msal/types.d.ts +93 -0
- package/dist/workerd/msal/types.d.ts.map +1 -0
- package/dist/workerd/msal/types.js +4 -0
- package/dist/workerd/msal/types.js.map +1 -0
- package/dist/workerd/msal/utils.d.ts +95 -0
- package/dist/workerd/msal/utils.d.ts.map +1 -0
- package/dist/workerd/msal/utils.js +233 -0
- package/dist/workerd/msal/utils.js.map +1 -0
- package/dist/workerd/package.json +3 -0
- package/dist/workerd/plugins/consumer.d.ts +28 -0
- package/dist/workerd/plugins/consumer.d.ts.map +1 -0
- package/dist/workerd/plugins/consumer.js +41 -0
- package/dist/workerd/plugins/consumer.js.map +1 -0
- package/dist/workerd/plugins/provider.d.ts +36 -0
- package/dist/workerd/plugins/provider.d.ts.map +1 -0
- package/dist/workerd/plugins/provider.js +4 -0
- package/dist/workerd/plugins/provider.js.map +1 -0
- package/dist/workerd/regionalAuthority.d.ts +122 -0
- package/dist/workerd/regionalAuthority.d.ts.map +1 -0
- package/dist/workerd/regionalAuthority.js +139 -0
- package/dist/workerd/regionalAuthority.js.map +1 -0
- package/dist/workerd/tokenCredentialOptions.d.ts +28 -0
- package/dist/workerd/tokenCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/tokenCredentialOptions.js +4 -0
- package/dist/workerd/tokenCredentialOptions.js.map +1 -0
- package/dist/workerd/tokenProvider.d.ts +39 -0
- package/dist/workerd/tokenProvider.d.ts.map +1 -0
- package/dist/workerd/tokenProvider.js +52 -0
- package/dist/workerd/tokenProvider.js.map +1 -0
- package/dist/workerd/util/authHostEnv-browser.d.mts +4 -0
- package/dist/workerd/util/authHostEnv-browser.d.mts.map +1 -0
- package/dist/workerd/util/authHostEnv-browser.mjs +7 -0
- package/dist/workerd/util/authHostEnv-browser.mjs.map +1 -0
- package/dist/workerd/util/identityTokenEndpoint.d.ts +2 -0
- package/dist/workerd/util/identityTokenEndpoint.d.ts.map +1 -0
- package/dist/workerd/util/identityTokenEndpoint.js +11 -0
- package/dist/workerd/util/identityTokenEndpoint.js.map +1 -0
- package/dist/workerd/util/logging.d.ts +70 -0
- package/dist/workerd/util/logging.d.ts.map +1 -0
- package/dist/workerd/util/logging.js +98 -0
- package/dist/workerd/util/logging.js.map +1 -0
- package/dist/workerd/util/processMultiTenantRequest.d.ts +10 -0
- package/dist/workerd/util/processMultiTenantRequest.d.ts.map +1 -0
- package/dist/workerd/util/processMultiTenantRequest.js +34 -0
- package/dist/workerd/util/processMultiTenantRequest.js.map +1 -0
- package/dist/workerd/util/processUtils.d.ts +13 -0
- package/dist/workerd/util/processUtils.d.ts.map +1 -0
- package/dist/workerd/util/processUtils.js +32 -0
- package/dist/workerd/util/processUtils.js.map +1 -0
- package/dist/workerd/util/scopeUtils.d.ts +17 -0
- package/dist/workerd/util/scopeUtils.d.ts.map +1 -0
- package/dist/workerd/util/scopeUtils.js +29 -0
- package/dist/workerd/util/scopeUtils.js.map +1 -0
- package/dist/workerd/util/subscriptionUtils.d.ts +6 -0
- package/dist/workerd/util/subscriptionUtils.d.ts.map +1 -0
- package/dist/workerd/util/subscriptionUtils.js +16 -0
- package/dist/workerd/util/subscriptionUtils.js.map +1 -0
- package/dist/workerd/util/tenantIdUtils.d.ts +15 -0
- package/dist/workerd/util/tenantIdUtils.d.ts.map +1 -0
- package/dist/workerd/util/tenantIdUtils.js +44 -0
- package/dist/workerd/util/tenantIdUtils.js.map +1 -0
- package/dist/workerd/util/tracing.d.ts +6 -0
- package/dist/workerd/util/tracing.d.ts.map +1 -0
- package/dist/workerd/util/tracing.js +14 -0
- package/dist/workerd/util/tracing.js.map +1 -0
- package/package.json +206 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
|
|
2
|
+
import type { AzureDeveloperCliCredentialOptions } from "./azureDeveloperCliCredentialOptions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Messages to use when throwing in this credential.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const azureDeveloperCliPublicErrorMessages: {
|
|
8
|
+
notInstalled: string;
|
|
9
|
+
login: string;
|
|
10
|
+
unknown: string;
|
|
11
|
+
claim: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Mockable reference to the Developer CLI credential cliCredentialFunctions
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const developerCliCredentialInternals: {
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
getSafeWorkingDir(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the access token from Azure Developer CLI
|
|
24
|
+
* @param scopes - The scopes to use when getting the token
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
getAzdAccessToken(scopes: string[], tenantId?: string, timeout?: number, claims?: string): Promise<{
|
|
28
|
+
stdout: string;
|
|
29
|
+
stderr: string;
|
|
30
|
+
error: Error | null;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Azure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy
|
|
35
|
+
* resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific
|
|
36
|
+
* to Azure developers. It allows users to authenticate as a user and/or a service principal against
|
|
37
|
+
* <a href="https://learn.microsoft.com/entra/fundamentals/">Microsoft Entra ID</a>. The
|
|
38
|
+
* AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of
|
|
39
|
+
* the logged-in user or service principal in the Azure Developer CLI. It acts as the Azure Developer CLI logged in user or
|
|
40
|
+
* service principal and executes an Azure CLI command underneath to authenticate the application against
|
|
41
|
+
* Microsoft Entra ID.
|
|
42
|
+
*
|
|
43
|
+
* <h2> Configure AzureDeveloperCliCredential </h2>
|
|
44
|
+
*
|
|
45
|
+
* To use this credential, the developer needs to authenticate locally in Azure Developer CLI using one of the
|
|
46
|
+
* commands below:
|
|
47
|
+
*
|
|
48
|
+
* <ol>
|
|
49
|
+
* <li>Run "azd auth login" in Azure Developer CLI to authenticate interactively as a user.</li>
|
|
50
|
+
* <li>Run "azd auth login --client-id clientID --client-secret clientSecret
|
|
51
|
+
* --tenant-id tenantID" to authenticate as a service principal.</li>
|
|
52
|
+
* </ol>
|
|
53
|
+
*
|
|
54
|
+
* You may need to repeat this process after a certain time period, depending on the refresh token validity in your
|
|
55
|
+
* organization. Generally, the refresh token validity period is a few weeks to a few months.
|
|
56
|
+
* AzureDeveloperCliCredential will prompt you to sign in again.
|
|
57
|
+
*/
|
|
58
|
+
export declare class AzureDeveloperCliCredential implements TokenCredential {
|
|
59
|
+
private tenantId?;
|
|
60
|
+
private additionallyAllowedTenantIds;
|
|
61
|
+
private timeout?;
|
|
62
|
+
/**
|
|
63
|
+
* Creates an instance of the {@link AzureDeveloperCliCredential}.
|
|
64
|
+
*
|
|
65
|
+
* To use this credential, ensure that you have already logged
|
|
66
|
+
* in via the 'azd' tool using the command "azd auth login" from the commandline.
|
|
67
|
+
*
|
|
68
|
+
* @param options - Options, to optionally allow multi-tenant requests.
|
|
69
|
+
*/
|
|
70
|
+
constructor(options?: AzureDeveloperCliCredentialOptions);
|
|
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
|
+
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=azureDeveloperCliCredential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azureDeveloperCliCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAalG;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;;;;CAQhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B;IAC1C;;OAEG;yBACkB,MAAM;IAiB3B;;;;OAIG;8BAEO,MAAM,EAAE,aACL,MAAM,YACP,MAAM,WACP,MAAM,GACd,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;KAAE,CAAC;CA0CpE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IACjE,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,4BAA4B,CAAW;IAC/C,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB;;;;;;;OAOG;gBACS,OAAO,CAAC,EAAE,kCAAkC;IAWxD;;;;;;;OAOG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,WAAW,CAAC;CAwFxB"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AzureDeveloperCliCredential = exports.developerCliCredentialInternals = exports.azureDeveloperCliPublicErrorMessages = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const logging_js_1 = require("../util/logging.js");
|
|
8
|
+
const errors_js_1 = require("../errors.js");
|
|
9
|
+
const child_process_1 = tslib_1.__importDefault(require("child_process"));
|
|
10
|
+
const tenantIdUtils_js_1 = require("../util/tenantIdUtils.js");
|
|
11
|
+
const tracing_js_1 = require("../util/tracing.js");
|
|
12
|
+
const scopeUtils_js_1 = require("../util/scopeUtils.js");
|
|
13
|
+
const logger = (0, logging_js_1.credentialLogger)("AzureDeveloperCliCredential");
|
|
14
|
+
/**
|
|
15
|
+
* Messages to use when throwing in this credential.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
exports.azureDeveloperCliPublicErrorMessages = {
|
|
19
|
+
notInstalled: "Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.",
|
|
20
|
+
login: "Please run 'azd auth login' from a command prompt to authenticate before using this credential. For more information, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.",
|
|
21
|
+
unknown: "Unknown error while trying to retrieve the access token",
|
|
22
|
+
claim: "This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:",
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Mockable reference to the Developer CLI credential cliCredentialFunctions
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
exports.developerCliCredentialInternals = {
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
getSafeWorkingDir() {
|
|
33
|
+
if (process.platform === "win32") {
|
|
34
|
+
let systemRoot = process.env.SystemRoot || process.env["SYSTEMROOT"];
|
|
35
|
+
if (!systemRoot) {
|
|
36
|
+
logger.getToken.warning("The SystemRoot environment variable is not set. This may cause issues when using the Azure Developer CLI credential.");
|
|
37
|
+
systemRoot = "C:\\Windows";
|
|
38
|
+
}
|
|
39
|
+
return systemRoot;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return "/bin";
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Gets the access token from Azure Developer CLI
|
|
47
|
+
* @param scopes - The scopes to use when getting the token
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
async getAzdAccessToken(scopes, tenantId, timeout, claims) {
|
|
51
|
+
let tenantSection = [];
|
|
52
|
+
if (tenantId) {
|
|
53
|
+
tenantSection = ["--tenant-id", tenantId];
|
|
54
|
+
}
|
|
55
|
+
let claimsSections = [];
|
|
56
|
+
if (claims) {
|
|
57
|
+
const encodedClaims = btoa(claims);
|
|
58
|
+
claimsSections = ["--claims", encodedClaims];
|
|
59
|
+
}
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
try {
|
|
62
|
+
const args = [
|
|
63
|
+
"auth",
|
|
64
|
+
"token",
|
|
65
|
+
"--output",
|
|
66
|
+
"json",
|
|
67
|
+
"--no-prompt",
|
|
68
|
+
...scopes.reduce((previous, current) => previous.concat("--scope", current), []),
|
|
69
|
+
...tenantSection,
|
|
70
|
+
...claimsSections,
|
|
71
|
+
];
|
|
72
|
+
const command = ["azd", ...args].join(" ");
|
|
73
|
+
child_process_1.default.exec(command, {
|
|
74
|
+
cwd: exports.developerCliCredentialInternals.getSafeWorkingDir(),
|
|
75
|
+
timeout,
|
|
76
|
+
}, (error, stdout, stderr) => {
|
|
77
|
+
resolve({ stdout, stderr, error });
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
catch (err) {
|
|
81
|
+
reject(err);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Azure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy
|
|
88
|
+
* resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific
|
|
89
|
+
* to Azure developers. It allows users to authenticate as a user and/or a service principal against
|
|
90
|
+
* <a href="https://learn.microsoft.com/entra/fundamentals/">Microsoft Entra ID</a>. The
|
|
91
|
+
* AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of
|
|
92
|
+
* the logged-in user or service principal in the Azure Developer CLI. It acts as the Azure Developer CLI logged in user or
|
|
93
|
+
* service principal and executes an Azure CLI command underneath to authenticate the application against
|
|
94
|
+
* Microsoft Entra ID.
|
|
95
|
+
*
|
|
96
|
+
* <h2> Configure AzureDeveloperCliCredential </h2>
|
|
97
|
+
*
|
|
98
|
+
* To use this credential, the developer needs to authenticate locally in Azure Developer CLI using one of the
|
|
99
|
+
* commands below:
|
|
100
|
+
*
|
|
101
|
+
* <ol>
|
|
102
|
+
* <li>Run "azd auth login" in Azure Developer CLI to authenticate interactively as a user.</li>
|
|
103
|
+
* <li>Run "azd auth login --client-id clientID --client-secret clientSecret
|
|
104
|
+
* --tenant-id tenantID" to authenticate as a service principal.</li>
|
|
105
|
+
* </ol>
|
|
106
|
+
*
|
|
107
|
+
* You may need to repeat this process after a certain time period, depending on the refresh token validity in your
|
|
108
|
+
* organization. Generally, the refresh token validity period is a few weeks to a few months.
|
|
109
|
+
* AzureDeveloperCliCredential will prompt you to sign in again.
|
|
110
|
+
*/
|
|
111
|
+
class AzureDeveloperCliCredential {
|
|
112
|
+
tenantId;
|
|
113
|
+
additionallyAllowedTenantIds;
|
|
114
|
+
timeout;
|
|
115
|
+
/**
|
|
116
|
+
* Creates an instance of the {@link AzureDeveloperCliCredential}.
|
|
117
|
+
*
|
|
118
|
+
* To use this credential, ensure that you have already logged
|
|
119
|
+
* in via the 'azd' tool using the command "azd auth login" from the commandline.
|
|
120
|
+
*
|
|
121
|
+
* @param options - Options, to optionally allow multi-tenant requests.
|
|
122
|
+
*/
|
|
123
|
+
constructor(options) {
|
|
124
|
+
if (options?.tenantId) {
|
|
125
|
+
(0, tenantIdUtils_js_1.checkTenantId)(logger, options?.tenantId);
|
|
126
|
+
this.tenantId = options?.tenantId;
|
|
127
|
+
}
|
|
128
|
+
this.additionallyAllowedTenantIds = (0, tenantIdUtils_js_1.resolveAdditionallyAllowedTenantIds)(options?.additionallyAllowedTenants);
|
|
129
|
+
this.timeout = options?.processTimeoutInMs;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Authenticates with Microsoft Entra ID and returns an access token if successful.
|
|
133
|
+
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
134
|
+
*
|
|
135
|
+
* @param scopes - The list of scopes for which the token will have access.
|
|
136
|
+
* @param options - The options used to configure any requests this
|
|
137
|
+
* TokenCredential implementation might make.
|
|
138
|
+
*/
|
|
139
|
+
async getToken(scopes, options = {}) {
|
|
140
|
+
const tenantId = (0, tenantIdUtils_js_1.processMultiTenantRequest)(this.tenantId, options, this.additionallyAllowedTenantIds);
|
|
141
|
+
if (tenantId) {
|
|
142
|
+
(0, tenantIdUtils_js_1.checkTenantId)(logger, tenantId);
|
|
143
|
+
}
|
|
144
|
+
let scopeList;
|
|
145
|
+
if (typeof scopes === "string") {
|
|
146
|
+
scopeList = [scopes];
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
scopeList = scopes;
|
|
150
|
+
}
|
|
151
|
+
logger.getToken.info(`Using the scopes ${scopes}`);
|
|
152
|
+
return tracing_js_1.tracingClient.withSpan(`${this.constructor.name}.getToken`, options, async () => {
|
|
153
|
+
try {
|
|
154
|
+
scopeList.forEach((scope) => {
|
|
155
|
+
(0, scopeUtils_js_1.ensureValidScopeForDevTimeCreds)(scope, logger);
|
|
156
|
+
});
|
|
157
|
+
const obj = await exports.developerCliCredentialInternals.getAzdAccessToken(scopeList, tenantId, this.timeout, options.claims);
|
|
158
|
+
const isMFARequiredError = obj.stderr?.match("must use multi-factor authentication") ||
|
|
159
|
+
obj.stderr?.match("reauthentication required");
|
|
160
|
+
const isNotLoggedInError = obj.stderr?.match("not logged in, run `azd login` to login") ||
|
|
161
|
+
obj.stderr?.match("not logged in, run `azd auth login` to login");
|
|
162
|
+
const isNotInstallError = obj.stderr?.match("azd:(.*)not found") ||
|
|
163
|
+
obj.stderr?.startsWith("'azd' is not recognized");
|
|
164
|
+
if (isNotInstallError || (obj.error && obj.error.code === "ENOENT")) {
|
|
165
|
+
const error = new errors_js_1.CredentialUnavailableError(exports.azureDeveloperCliPublicErrorMessages.notInstalled);
|
|
166
|
+
logger.getToken.info((0, logging_js_1.formatError)(scopes, error));
|
|
167
|
+
throw error;
|
|
168
|
+
}
|
|
169
|
+
if (isNotLoggedInError) {
|
|
170
|
+
const error = new errors_js_1.CredentialUnavailableError(exports.azureDeveloperCliPublicErrorMessages.login);
|
|
171
|
+
logger.getToken.info((0, logging_js_1.formatError)(scopes, error));
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
if (isMFARequiredError) {
|
|
175
|
+
const scope = scopeList
|
|
176
|
+
.reduce((previous, current) => previous.concat("--scope", current), [])
|
|
177
|
+
.join(" ");
|
|
178
|
+
const loginCmd = `azd auth login ${scope}`;
|
|
179
|
+
const error = new errors_js_1.CredentialUnavailableError(`${exports.azureDeveloperCliPublicErrorMessages.claim} ${loginCmd}`);
|
|
180
|
+
logger.getToken.info((0, logging_js_1.formatError)(scopes, error));
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
const resp = JSON.parse(obj.stdout);
|
|
185
|
+
logger.getToken.info((0, logging_js_1.formatSuccess)(scopes));
|
|
186
|
+
return {
|
|
187
|
+
token: resp.token,
|
|
188
|
+
expiresOnTimestamp: new Date(resp.expiresOn).getTime(),
|
|
189
|
+
tokenType: "Bearer",
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
if (obj.stderr) {
|
|
194
|
+
throw new errors_js_1.CredentialUnavailableError(obj.stderr);
|
|
195
|
+
}
|
|
196
|
+
throw e;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
catch (err) {
|
|
200
|
+
const error = err.name === "CredentialUnavailableError"
|
|
201
|
+
? err
|
|
202
|
+
: new errors_js_1.CredentialUnavailableError(err.message || exports.azureDeveloperCliPublicErrorMessages.unknown);
|
|
203
|
+
logger.getToken.info((0, logging_js_1.formatError)(scopes, error));
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
exports.AzureDeveloperCliCredential = AzureDeveloperCliCredential;
|
|
210
|
+
//# sourceMappingURL=azureDeveloperCliCredential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azureDeveloperCliCredential.js","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredential.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 type { AzureDeveloperCliCredentialOptions } from \"./azureDeveloperCliCredentialOptions.js\";\nimport { CredentialUnavailableError } from \"../errors.js\";\nimport child_process from \"child_process\";\nimport {\n checkTenantId,\n processMultiTenantRequest,\n resolveAdditionallyAllowedTenantIds,\n} from \"../util/tenantIdUtils.js\";\nimport { tracingClient } from \"../util/tracing.js\";\nimport { ensureValidScopeForDevTimeCreds } from \"../util/scopeUtils.js\";\n\nconst logger = credentialLogger(\"AzureDeveloperCliCredential\");\n\n/**\n * Messages to use when throwing in this credential.\n * @internal\n */\nexport const azureDeveloperCliPublicErrorMessages = {\n notInstalled:\n \"Azure Developer CLI couldn't be found. To mitigate this issue, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.\",\n login:\n \"Please run 'azd auth login' from a command prompt to authenticate before using this credential. For more information, see the troubleshooting guidelines at https://aka.ms/azsdk/js/identity/azdevclicredential/troubleshoot.\",\n unknown: \"Unknown error while trying to retrieve the access token\",\n claim:\n \"This credential doesn't support claims challenges. To authenticate with the required claims, please run the following command:\",\n};\n\n/**\n * Mockable reference to the Developer CLI credential cliCredentialFunctions\n * @internal\n */\nexport const developerCliCredentialInternals = {\n /**\n * @internal\n */\n getSafeWorkingDir(): string {\n if (process.platform === \"win32\") {\n let systemRoot = process.env.SystemRoot || process.env[\"SYSTEMROOT\"];\n if (!systemRoot) {\n logger.getToken.warning(\n \"The SystemRoot environment variable is not set. This may cause issues when using the Azure Developer CLI credential.\",\n );\n\n systemRoot = \"C:\\\\Windows\";\n }\n\n return systemRoot;\n } else {\n return \"/bin\";\n }\n },\n\n /**\n * Gets the access token from Azure Developer CLI\n * @param scopes - The scopes to use when getting the token\n * @internal\n */\n async getAzdAccessToken(\n scopes: string[],\n tenantId?: string,\n timeout?: number,\n claims?: string,\n ): Promise<{ stdout: string; stderr: string; error: Error | null }> {\n let tenantSection: string[] = [];\n if (tenantId) {\n tenantSection = [\"--tenant-id\", tenantId];\n }\n\n let claimsSections: string[] = [];\n if (claims) {\n const encodedClaims = btoa(claims);\n claimsSections = [\"--claims\", encodedClaims];\n }\n return new Promise((resolve, reject) => {\n try {\n const args = [\n \"auth\",\n \"token\",\n \"--output\",\n \"json\",\n \"--no-prompt\",\n ...scopes.reduce<string[]>(\n (previous, current) => previous.concat(\"--scope\", current),\n [],\n ),\n ...tenantSection,\n ...claimsSections,\n ];\n const command = [\"azd\", ...args].join(\" \");\n child_process.exec(\n command,\n {\n cwd: developerCliCredentialInternals.getSafeWorkingDir(),\n timeout,\n },\n (error, stdout, stderr) => {\n resolve({ stdout, stderr, error });\n },\n );\n } catch (err: any) {\n reject(err);\n }\n });\n },\n};\n\n/**\n * Azure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy\n * resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific\n * to Azure developers. It allows users to authenticate as a user and/or a service principal against\n * <a href=\"https://learn.microsoft.com/entra/fundamentals/\">Microsoft Entra ID</a>. The\n * AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of\n * the logged-in user or service principal in the Azure Developer CLI. It acts as the Azure Developer CLI logged in user or\n * service principal and executes an Azure CLI command underneath to authenticate the application against\n * Microsoft Entra ID.\n *\n * <h2> Configure AzureDeveloperCliCredential </h2>\n *\n * To use this credential, the developer needs to authenticate locally in Azure Developer CLI using one of the\n * commands below:\n *\n * <ol>\n * <li>Run \"azd auth login\" in Azure Developer CLI to authenticate interactively as a user.</li>\n * <li>Run \"azd auth login --client-id clientID --client-secret clientSecret\n * --tenant-id tenantID\" to authenticate as a service principal.</li>\n * </ol>\n *\n * You may need to repeat this process after a certain time period, depending on the refresh token validity in your\n * organization. Generally, the refresh token validity period is a few weeks to a few months.\n * AzureDeveloperCliCredential will prompt you to sign in again.\n */\nexport class AzureDeveloperCliCredential implements TokenCredential {\n private tenantId?: string;\n private additionallyAllowedTenantIds: string[];\n private timeout?: number;\n\n /**\n * Creates an instance of the {@link AzureDeveloperCliCredential}.\n *\n * To use this credential, ensure that you have already logged\n * in via the 'azd' tool using the command \"azd auth login\" from the commandline.\n *\n * @param options - Options, to optionally allow multi-tenant requests.\n */\n constructor(options?: AzureDeveloperCliCredentialOptions) {\n if (options?.tenantId) {\n checkTenantId(logger, options?.tenantId);\n this.tenantId = options?.tenantId;\n }\n this.additionallyAllowedTenantIds = resolveAdditionallyAllowedTenantIds(\n options?.additionallyAllowedTenants,\n );\n this.timeout = options?.processTimeoutInMs;\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> {\n const tenantId = processMultiTenantRequest(\n this.tenantId,\n options,\n this.additionallyAllowedTenantIds,\n );\n if (tenantId) {\n checkTenantId(logger, tenantId);\n }\n let scopeList: string[];\n if (typeof scopes === \"string\") {\n scopeList = [scopes];\n } else {\n scopeList = scopes;\n }\n logger.getToken.info(`Using the scopes ${scopes}`);\n\n return tracingClient.withSpan(`${this.constructor.name}.getToken`, options, async () => {\n try {\n scopeList.forEach((scope) => {\n ensureValidScopeForDevTimeCreds(scope, logger);\n });\n const obj = await developerCliCredentialInternals.getAzdAccessToken(\n scopeList,\n tenantId,\n this.timeout,\n options.claims,\n );\n const isMFARequiredError =\n obj.stderr?.match(\"must use multi-factor authentication\") ||\n obj.stderr?.match(\"reauthentication required\");\n const isNotLoggedInError =\n obj.stderr?.match(\"not logged in, run `azd login` to login\") ||\n obj.stderr?.match(\"not logged in, run `azd auth login` to login\");\n const isNotInstallError =\n obj.stderr?.match(\"azd:(.*)not found\") ||\n obj.stderr?.startsWith(\"'azd' is not recognized\");\n if (isNotInstallError || (obj.error && (obj.error as any).code === \"ENOENT\")) {\n const error = new CredentialUnavailableError(\n azureDeveloperCliPublicErrorMessages.notInstalled,\n );\n logger.getToken.info(formatError(scopes, error));\n throw error;\n }\n\n if (isNotLoggedInError) {\n const error = new CredentialUnavailableError(azureDeveloperCliPublicErrorMessages.login);\n logger.getToken.info(formatError(scopes, error));\n throw error;\n }\n if (isMFARequiredError) {\n const scope = scopeList\n .reduce<string[]>((previous, current) => previous.concat(\"--scope\", current), [])\n .join(\" \");\n const loginCmd = `azd auth login ${scope}`;\n const error = new CredentialUnavailableError(\n `${azureDeveloperCliPublicErrorMessages.claim} ${loginCmd}`,\n );\n logger.getToken.info(formatError(scopes, error));\n throw error;\n }\n\n try {\n const resp: { token: string; expiresOn: string } = JSON.parse(obj.stdout);\n logger.getToken.info(formatSuccess(scopes));\n return {\n token: resp.token,\n expiresOnTimestamp: new Date(resp.expiresOn).getTime(),\n tokenType: \"Bearer\",\n } as AccessToken;\n } catch (e: any) {\n if (obj.stderr) {\n throw new CredentialUnavailableError(obj.stderr);\n }\n throw e;\n }\n } catch (err: any) {\n const error =\n err.name === \"CredentialUnavailableError\"\n ? err\n : new CredentialUnavailableError(\n (err as Error).message || azureDeveloperCliPublicErrorMessages.unknown,\n );\n logger.getToken.info(formatError(scopes, error));\n throw error;\n }\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
|
|
2
|
+
/**
|
|
3
|
+
* Options for the {@link AzureDeveloperCliCredential}
|
|
4
|
+
*/
|
|
5
|
+
export interface AzureDeveloperCliCredentialOptions extends MultiTenantTokenCredentialOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Allows specifying a tenant ID
|
|
8
|
+
*/
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Process timeout configurable for making token requests, provided in milliseconds
|
|
12
|
+
*/
|
|
13
|
+
processTimeoutInMs?: number;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=azureDeveloperCliCredentialOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azureDeveloperCliCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,iCAAiC;IAC3F;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azureDeveloperCliCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/azureDeveloperCliCredentialOptions.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 * Options for the {@link AzureDeveloperCliCredential}\n */\nexport interface AzureDeveloperCliCredentialOptions extends MultiTenantTokenCredentialOptions {\n /**\n * Allows specifying a tenant ID\n */\n tenantId?: string;\n /**\n * Process timeout configurable for making token requests, provided in milliseconds\n */\n processTimeoutInMs?: number;\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
|
|
2
|
+
import type { AzurePipelinesCredentialOptions } from "./azurePipelinesCredentialOptions.js";
|
|
3
|
+
import type { PipelineResponse } from "@azure/core-rest-pipeline";
|
|
4
|
+
/**
|
|
5
|
+
* This credential is designed to be used in Azure Pipelines with service connections
|
|
6
|
+
* as a setup for workload identity federation.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AzurePipelinesCredential implements TokenCredential {
|
|
9
|
+
private clientAssertionCredential;
|
|
10
|
+
private identityClient;
|
|
11
|
+
/**
|
|
12
|
+
* AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.
|
|
13
|
+
* @param tenantId - tenantId associated with the service connection
|
|
14
|
+
* @param clientId - clientId associated with the service connection
|
|
15
|
+
* @param serviceConnectionId - Unique ID for the service connection, as found in the querystring's resourceId key
|
|
16
|
+
* @param systemAccessToken - The pipeline's <see href="https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops%26tabs=yaml#systemaccesstoken">System.AccessToken</see> value.
|
|
17
|
+
* @param options - The identity client options to use for authentication.
|
|
18
|
+
*/
|
|
19
|
+
constructor(tenantId: string, clientId: string, serviceConnectionId: string, systemAccessToken: string, options?: AzurePipelinesCredentialOptions);
|
|
20
|
+
/**
|
|
21
|
+
* Authenticates with Microsoft Entra ID and returns an access token if successful.
|
|
22
|
+
* If authentication fails, a {@link CredentialUnavailableError} or {@link AuthenticationError} will be thrown with the details of the failure.
|
|
23
|
+
*
|
|
24
|
+
* @param scopes - The list of scopes for which the token will have access.
|
|
25
|
+
* @param options - The options used to configure any requests this
|
|
26
|
+
* TokenCredential implementation might make.
|
|
27
|
+
*/
|
|
28
|
+
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @param oidcRequestUrl - oidc request url
|
|
32
|
+
* @param systemAccessToken - system access token
|
|
33
|
+
* @returns OIDC token from Azure Pipelines
|
|
34
|
+
*/
|
|
35
|
+
private requestOidcToken;
|
|
36
|
+
}
|
|
37
|
+
export declare function handleOidcResponse(response: PipelineResponse): string;
|
|
38
|
+
//# sourceMappingURL=azurePipelinesCredential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azurePipelinesCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAItF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAG5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAQlE;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,eAAe;IAC9D,OAAO,CAAC,yBAAyB,CAAwC;IACzE,OAAO,CAAC,cAAc,CAAiB;IAEvC;;;;;;;OAOG;gBAED,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,mBAAmB,EAAE,MAAM,EAC3B,iBAAiB,EAAE,MAAM,EACzB,OAAO,GAAE,+BAAoC;IAwD/C;;;;;;;OAOG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,WAAW,CAAC;IAgBvB;;;;;OAKG;YACW,gBAAgB;CAmB/B;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CA6CrE"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AzurePipelinesCredential = void 0;
|
|
6
|
+
exports.handleOidcResponse = handleOidcResponse;
|
|
7
|
+
const errors_js_1 = require("../errors.js");
|
|
8
|
+
const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
|
|
9
|
+
const clientAssertionCredential_js_1 = require("./clientAssertionCredential.js");
|
|
10
|
+
const identityClient_js_1 = require("../client/identityClient.js");
|
|
11
|
+
const tenantIdUtils_js_1 = require("../util/tenantIdUtils.js");
|
|
12
|
+
const logging_js_1 = require("../util/logging.js");
|
|
13
|
+
const credentialName = "AzurePipelinesCredential";
|
|
14
|
+
const logger = (0, logging_js_1.credentialLogger)(credentialName);
|
|
15
|
+
const OIDC_API_VERSION = "7.1";
|
|
16
|
+
/**
|
|
17
|
+
* This credential is designed to be used in Azure Pipelines with service connections
|
|
18
|
+
* as a setup for workload identity federation.
|
|
19
|
+
*/
|
|
20
|
+
class AzurePipelinesCredential {
|
|
21
|
+
clientAssertionCredential;
|
|
22
|
+
identityClient;
|
|
23
|
+
/**
|
|
24
|
+
* AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.
|
|
25
|
+
* @param tenantId - tenantId associated with the service connection
|
|
26
|
+
* @param clientId - clientId associated with the service connection
|
|
27
|
+
* @param serviceConnectionId - Unique ID for the service connection, as found in the querystring's resourceId key
|
|
28
|
+
* @param systemAccessToken - The pipeline's <see href="https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops%26tabs=yaml#systemaccesstoken">System.AccessToken</see> value.
|
|
29
|
+
* @param options - The identity client options to use for authentication.
|
|
30
|
+
*/
|
|
31
|
+
constructor(tenantId, clientId, serviceConnectionId, systemAccessToken, options = {}) {
|
|
32
|
+
if (!clientId) {
|
|
33
|
+
throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. clientId is a required parameter.`);
|
|
34
|
+
}
|
|
35
|
+
if (!tenantId) {
|
|
36
|
+
throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. tenantId is a required parameter.`);
|
|
37
|
+
}
|
|
38
|
+
if (!serviceConnectionId) {
|
|
39
|
+
throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. serviceConnectionId is a required parameter.`);
|
|
40
|
+
}
|
|
41
|
+
if (!systemAccessToken) {
|
|
42
|
+
throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. systemAccessToken is a required parameter.`);
|
|
43
|
+
}
|
|
44
|
+
// Allow these headers to be logged for troubleshooting by AzurePipelines.
|
|
45
|
+
options.loggingOptions = {
|
|
46
|
+
...options?.loggingOptions,
|
|
47
|
+
additionalAllowedHeaderNames: [
|
|
48
|
+
...(options.loggingOptions?.additionalAllowedHeaderNames ?? []),
|
|
49
|
+
"x-vss-e2eid",
|
|
50
|
+
"x-msedge-ref",
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
this.identityClient = new identityClient_js_1.IdentityClient(options);
|
|
54
|
+
(0, tenantIdUtils_js_1.checkTenantId)(logger, tenantId);
|
|
55
|
+
logger.info(`Invoking AzurePipelinesCredential with tenant ID: ${tenantId}, client ID: ${clientId}, and service connection ID: ${serviceConnectionId}`);
|
|
56
|
+
if (!process.env.SYSTEM_OIDCREQUESTURI) {
|
|
57
|
+
throw new errors_js_1.CredentialUnavailableError(`${credentialName}: is unavailable. Ensure that you're running this task in an Azure Pipeline, so that following missing system variable(s) can be defined- "SYSTEM_OIDCREQUESTURI"`);
|
|
58
|
+
}
|
|
59
|
+
const oidcRequestUrl = `${process.env.SYSTEM_OIDCREQUESTURI}?api-version=${OIDC_API_VERSION}&serviceConnectionId=${serviceConnectionId}`;
|
|
60
|
+
logger.info(`Invoking ClientAssertionCredential with tenant ID: ${tenantId}, client ID: ${clientId} and service connection ID: ${serviceConnectionId}`);
|
|
61
|
+
this.clientAssertionCredential = new clientAssertionCredential_js_1.ClientAssertionCredential(tenantId, clientId, this.requestOidcToken.bind(this, oidcRequestUrl, systemAccessToken), options);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Authenticates with Microsoft Entra ID and returns an access token if successful.
|
|
65
|
+
* If authentication fails, a {@link CredentialUnavailableError} or {@link AuthenticationError} will be thrown with the details of the failure.
|
|
66
|
+
*
|
|
67
|
+
* @param scopes - The list of scopes for which the token will have access.
|
|
68
|
+
* @param options - The options used to configure any requests this
|
|
69
|
+
* TokenCredential implementation might make.
|
|
70
|
+
*/
|
|
71
|
+
async getToken(scopes, options) {
|
|
72
|
+
if (!this.clientAssertionCredential) {
|
|
73
|
+
const errorMessage = `${credentialName}: is unavailable. To use Federation Identity in Azure Pipelines, the following parameters are required -
|
|
74
|
+
tenantId,
|
|
75
|
+
clientId,
|
|
76
|
+
serviceConnectionId,
|
|
77
|
+
systemAccessToken,
|
|
78
|
+
"SYSTEM_OIDCREQUESTURI".
|
|
79
|
+
See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;
|
|
80
|
+
logger.error(errorMessage);
|
|
81
|
+
throw new errors_js_1.CredentialUnavailableError(errorMessage);
|
|
82
|
+
}
|
|
83
|
+
logger.info("Invoking getToken() of Client Assertion Credential");
|
|
84
|
+
return this.clientAssertionCredential.getToken(scopes, options);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @param oidcRequestUrl - oidc request url
|
|
89
|
+
* @param systemAccessToken - system access token
|
|
90
|
+
* @returns OIDC token from Azure Pipelines
|
|
91
|
+
*/
|
|
92
|
+
async requestOidcToken(oidcRequestUrl, systemAccessToken) {
|
|
93
|
+
logger.info("Requesting OIDC token from Azure Pipelines...");
|
|
94
|
+
logger.info(oidcRequestUrl);
|
|
95
|
+
const request = (0, core_rest_pipeline_1.createPipelineRequest)({
|
|
96
|
+
url: oidcRequestUrl,
|
|
97
|
+
method: "POST",
|
|
98
|
+
headers: (0, core_rest_pipeline_1.createHttpHeaders)({
|
|
99
|
+
"Content-Type": "application/json",
|
|
100
|
+
Authorization: `Bearer ${systemAccessToken}`,
|
|
101
|
+
// Prevents the service from responding with a redirect HTTP status code (useful for automation).
|
|
102
|
+
"X-TFS-FedAuthRedirect": "Suppress",
|
|
103
|
+
}),
|
|
104
|
+
});
|
|
105
|
+
const response = await this.identityClient.sendRequest(request);
|
|
106
|
+
return handleOidcResponse(response);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.AzurePipelinesCredential = AzurePipelinesCredential;
|
|
110
|
+
function handleOidcResponse(response) {
|
|
111
|
+
// OIDC token is present in `bodyAsText` field
|
|
112
|
+
const text = response.bodyAsText;
|
|
113
|
+
if (!text) {
|
|
114
|
+
logger.error(`${credentialName}: Authentication Failed. Received null token from OIDC request. Response status- ${response.status}. Complete response - ${JSON.stringify(response)}`);
|
|
115
|
+
throw new errors_js_1.AuthenticationError(response.status, {
|
|
116
|
+
error: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,
|
|
117
|
+
error_description: `${JSON.stringify(response)}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
const result = JSON.parse(text);
|
|
122
|
+
if (result?.oidcToken) {
|
|
123
|
+
return result.oidcToken;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
const errorMessage = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;
|
|
127
|
+
let errorDescription = ``;
|
|
128
|
+
if (response.status !== 200) {
|
|
129
|
+
errorDescription = `Response body = ${text}. Response Headers ["x-vss-e2eid"] = ${response.headers.get("x-vss-e2eid")} and ["x-msedge-ref"] = ${response.headers.get("x-msedge-ref")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;
|
|
130
|
+
}
|
|
131
|
+
logger.error(errorMessage);
|
|
132
|
+
logger.error(errorDescription);
|
|
133
|
+
throw new errors_js_1.AuthenticationError(response.status, {
|
|
134
|
+
error: errorMessage,
|
|
135
|
+
error_description: errorDescription,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
catch (e) {
|
|
140
|
+
const errorDetails = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;
|
|
141
|
+
logger.error(`Response from service = ${text}, Response Headers ["x-vss-e2eid"] = ${response.headers.get("x-vss-e2eid")}
|
|
142
|
+
and ["x-msedge-ref"] = ${response.headers.get("x-msedge-ref")}, error message = ${e.message}`);
|
|
143
|
+
logger.error(errorDetails);
|
|
144
|
+
throw new errors_js_1.AuthenticationError(response.status, {
|
|
145
|
+
error: errorDetails,
|
|
146
|
+
error_description: `Response = ${text}. Response headers ["x-vss-e2eid"] = ${response.headers.get("x-vss-e2eid")} and ["x-msedge-ref"] = ${response.headers.get("x-msedge-ref")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=azurePipelinesCredential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azurePipelinesCredential.js","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredential.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 { AuthenticationError, CredentialUnavailableError } from \"../errors.js\";\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\n\nimport type { AzurePipelinesCredentialOptions } from \"./azurePipelinesCredentialOptions.js\";\nimport { ClientAssertionCredential } from \"./clientAssertionCredential.js\";\nimport { IdentityClient } from \"../client/identityClient.js\";\nimport type { PipelineResponse } from \"@azure/core-rest-pipeline\";\nimport { checkTenantId } from \"../util/tenantIdUtils.js\";\nimport { credentialLogger } from \"../util/logging.js\";\n\nconst credentialName = \"AzurePipelinesCredential\";\nconst logger = credentialLogger(credentialName);\nconst OIDC_API_VERSION = \"7.1\";\n\n/**\n * This credential is designed to be used in Azure Pipelines with service connections\n * as a setup for workload identity federation.\n */\nexport class AzurePipelinesCredential implements TokenCredential {\n private clientAssertionCredential: ClientAssertionCredential | undefined;\n private identityClient: IdentityClient;\n\n /**\n * AzurePipelinesCredential supports Federated Identity on Azure Pipelines through Service Connections.\n * @param tenantId - tenantId associated with the service connection\n * @param clientId - clientId associated with the service connection\n * @param serviceConnectionId - Unique ID for the service connection, as found in the querystring's resourceId key\n * @param systemAccessToken - The pipeline's <see href=\"https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops%26tabs=yaml#systemaccesstoken\">System.AccessToken</see> value.\n * @param options - The identity client options to use for authentication.\n */\n constructor(\n tenantId: string,\n clientId: string,\n serviceConnectionId: string,\n systemAccessToken: string,\n options: AzurePipelinesCredentialOptions = {},\n ) {\n if (!clientId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. clientId is a required parameter.`,\n );\n }\n if (!tenantId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. tenantId is a required parameter.`,\n );\n }\n if (!serviceConnectionId) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. serviceConnectionId is a required parameter.`,\n );\n }\n if (!systemAccessToken) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. systemAccessToken is a required parameter.`,\n );\n }\n\n // Allow these headers to be logged for troubleshooting by AzurePipelines.\n options.loggingOptions = {\n ...options?.loggingOptions,\n additionalAllowedHeaderNames: [\n ...(options.loggingOptions?.additionalAllowedHeaderNames ?? []),\n \"x-vss-e2eid\",\n \"x-msedge-ref\",\n ],\n };\n\n this.identityClient = new IdentityClient(options);\n checkTenantId(logger, tenantId);\n logger.info(\n `Invoking AzurePipelinesCredential with tenant ID: ${tenantId}, client ID: ${clientId}, and service connection ID: ${serviceConnectionId}`,\n );\n if (!process.env.SYSTEM_OIDCREQUESTURI) {\n throw new CredentialUnavailableError(\n `${credentialName}: is unavailable. Ensure that you're running this task in an Azure Pipeline, so that following missing system variable(s) can be defined- \"SYSTEM_OIDCREQUESTURI\"`,\n );\n }\n\n const oidcRequestUrl = `${process.env.SYSTEM_OIDCREQUESTURI}?api-version=${OIDC_API_VERSION}&serviceConnectionId=${serviceConnectionId}`;\n logger.info(\n `Invoking ClientAssertionCredential with tenant ID: ${tenantId}, client ID: ${clientId} and service connection ID: ${serviceConnectionId}`,\n );\n this.clientAssertionCredential = new ClientAssertionCredential(\n tenantId,\n clientId,\n this.requestOidcToken.bind(this, oidcRequestUrl, systemAccessToken),\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} or {@link AuthenticationError} 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> {\n if (!this.clientAssertionCredential) {\n const errorMessage = `${credentialName}: is unavailable. To use Federation Identity in Azure Pipelines, the following parameters are required - \n tenantId,\n clientId,\n serviceConnectionId,\n systemAccessToken,\n \"SYSTEM_OIDCREQUESTURI\". \n See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;\n logger.error(errorMessage);\n throw new CredentialUnavailableError(errorMessage);\n }\n logger.info(\"Invoking getToken() of Client Assertion Credential\");\n return this.clientAssertionCredential.getToken(scopes, options);\n }\n\n /**\n *\n * @param oidcRequestUrl - oidc request url\n * @param systemAccessToken - system access token\n * @returns OIDC token from Azure Pipelines\n */\n private async requestOidcToken(\n oidcRequestUrl: string,\n systemAccessToken: string,\n ): Promise<string> {\n logger.info(\"Requesting OIDC token from Azure Pipelines...\");\n logger.info(oidcRequestUrl);\n const request = createPipelineRequest({\n url: oidcRequestUrl,\n method: \"POST\",\n headers: createHttpHeaders({\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${systemAccessToken}`,\n // Prevents the service from responding with a redirect HTTP status code (useful for automation).\n \"X-TFS-FedAuthRedirect\": \"Suppress\",\n }),\n });\n const response = await this.identityClient.sendRequest(request);\n return handleOidcResponse(response);\n }\n}\n\nexport function handleOidcResponse(response: PipelineResponse): string {\n // OIDC token is present in `bodyAsText` field\n const text = response.bodyAsText;\n if (!text) {\n logger.error(\n `${credentialName}: Authentication Failed. Received null token from OIDC request. Response status- ${\n response.status\n }. Complete response - ${JSON.stringify(response)}`,\n );\n throw new AuthenticationError(response.status, {\n error: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,\n error_description: `${JSON.stringify(\n response,\n )}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,\n });\n }\n try {\n const result = JSON.parse(text);\n if (result?.oidcToken) {\n return result.oidcToken;\n } else {\n const errorMessage = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;\n let errorDescription = ``;\n if (response.status !== 200) {\n errorDescription = `Response body = ${text}. Response Headers [\"x-vss-e2eid\"] = ${response.headers.get(\"x-vss-e2eid\")} and [\"x-msedge-ref\"] = ${response.headers.get(\"x-msedge-ref\")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`;\n }\n logger.error(errorMessage);\n logger.error(errorDescription);\n throw new AuthenticationError(response.status, {\n error: errorMessage,\n error_description: errorDescription,\n });\n }\n } catch (e: any) {\n const errorDetails = `${credentialName}: Authentication Failed. oidcToken field not detected in the response.`;\n logger.error(\n `Response from service = ${text}, Response Headers [\"x-vss-e2eid\"] = ${response.headers.get(\"x-vss-e2eid\")} \n and [\"x-msedge-ref\"] = ${response.headers.get(\"x-msedge-ref\")}, error message = ${e.message}`,\n );\n logger.error(errorDetails);\n throw new AuthenticationError(response.status, {\n error: errorDetails,\n error_description: `Response = ${text}. Response headers [\"x-vss-e2eid\"] = ${response.headers.get(\"x-vss-e2eid\")} and [\"x-msedge-ref\"] = ${response.headers.get(\"x-msedge-ref\")}. See the troubleshooting guide for more information: https://aka.ms/azsdk/js/identity/azurepipelinescredential/troubleshoot`,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AuthorityValidationOptions } from "./authorityValidationOptions.js";
|
|
2
|
+
import type { CredentialPersistenceOptions } from "./credentialPersistenceOptions.js";
|
|
3
|
+
import type { MultiTenantTokenCredentialOptions } from "./multiTenantTokenCredentialOptions.js";
|
|
4
|
+
/**
|
|
5
|
+
* Optional parameters for the {@link AzurePipelinesCredential} class.
|
|
6
|
+
*/
|
|
7
|
+
export interface AzurePipelinesCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions, AuthorityValidationOptions {
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=azurePipelinesCredentialOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azurePipelinesCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredentialOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,+BACf,SAAQ,iCAAiC,EACvC,4BAA4B,EAC5B,0BAA0B;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azurePipelinesCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/azurePipelinesCredentialOptions.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 { CredentialPersistenceOptions } from \"./credentialPersistenceOptions.js\";\nimport type { MultiTenantTokenCredentialOptions } from \"./multiTenantTokenCredentialOptions.js\";\n\n/**\n * Optional parameters for the {@link AzurePipelinesCredential} class.\n */\nexport interface AzurePipelinesCredentialOptions\n extends MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"]}
|