@azure/identity 4.14.0 → 4.15.0-beta.1
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/README.md +19 -0
- package/dist/browser/constants.d.ts +1 -1
- package/dist/browser/constants.d.ts.map +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/credentials/gitHubActionsCredential-browser.d.mts +14 -0
- package/dist/browser/credentials/gitHubActionsCredential-browser.d.mts.map +1 -0
- package/dist/browser/credentials/gitHubActionsCredential-browser.mjs +23 -0
- package/dist/browser/credentials/gitHubActionsCredential-browser.mjs.map +1 -0
- package/dist/browser/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
- package/dist/browser/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
- package/dist/browser/credentials/gitHubActionsCredentialOptions.js +4 -0
- package/dist/browser/credentials/gitHubActionsCredentialOptions.js.map +1 -0
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/package.json +1 -1
- package/dist/commonjs/constants.d.ts +1 -1
- package/dist/commonjs/constants.d.ts.map +1 -1
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/credentials/gitHubActionsCredential.d.ts +54 -0
- package/dist/commonjs/credentials/gitHubActionsCredential.d.ts.map +1 -0
- package/dist/commonjs/credentials/gitHubActionsCredential.js +184 -0
- package/dist/commonjs/credentials/gitHubActionsCredential.js.map +7 -0
- package/dist/commonjs/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
- package/dist/commonjs/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
- package/dist/commonjs/credentials/gitHubActionsCredentialOptions.js +16 -0
- package/dist/commonjs/credentials/gitHubActionsCredentialOptions.js.map +7 -0
- package/dist/commonjs/index.d.ts +2 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +3 -0
- package/dist/commonjs/index.js.map +2 -2
- package/dist/commonjs/package.json +1 -1
- package/dist/esm/constants.d.ts +1 -1
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/credentials/gitHubActionsCredential.d.ts +54 -0
- package/dist/esm/credentials/gitHubActionsCredential.d.ts.map +1 -0
- package/dist/esm/credentials/gitHubActionsCredential.js +179 -0
- package/dist/esm/credentials/gitHubActionsCredential.js.map +1 -0
- package/dist/esm/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
- package/dist/esm/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
- package/dist/esm/credentials/gitHubActionsCredentialOptions.js +4 -0
- package/dist/esm/credentials/gitHubActionsCredentialOptions.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/workerd/constants.d.ts +1 -1
- package/dist/workerd/constants.d.ts.map +1 -1
- package/dist/workerd/constants.js +1 -1
- package/dist/workerd/constants.js.map +1 -1
- package/dist/workerd/credentials/gitHubActionsCredential.d.ts +54 -0
- package/dist/workerd/credentials/gitHubActionsCredential.d.ts.map +1 -0
- package/dist/workerd/credentials/gitHubActionsCredential.js +179 -0
- package/dist/workerd/credentials/gitHubActionsCredential.js.map +1 -0
- package/dist/workerd/credentials/gitHubActionsCredentialOptions.d.ts +9 -0
- package/dist/workerd/credentials/gitHubActionsCredentialOptions.d.ts.map +1 -0
- package/dist/workerd/credentials/gitHubActionsCredentialOptions.js +4 -0
- package/dist/workerd/credentials/gitHubActionsCredentialOptions.js.map +1 -0
- package/dist/workerd/index.d.ts +2 -0
- package/dist/workerd/index.d.ts.map +1 -1
- package/dist/workerd/index.js +1 -0
- package/dist/workerd/index.js.map +1 -1
- package/dist/workerd/package.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/credentials/gitHubActionsCredentialOptions.ts"],
|
|
4
|
+
"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 GitHubActionsCredential} class.\n */\nexport interface GitHubActionsCredentialOptions\n extends\n MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export type { DeviceCodeCredentialOptions } from "./credentials/deviceCodeCreden
|
|
|
37
37
|
export { AzurePipelinesCredential as AzurePipelinesCredential } from "./credentials/azurePipelinesCredential.js";
|
|
38
38
|
export type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from "./credentials/azurePipelinesCredentialOptions.js";
|
|
39
39
|
export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential.js";
|
|
40
|
+
export { GitHubActionsCredential } from "./credentials/gitHubActionsCredential.js";
|
|
41
|
+
export type { GitHubActionsCredentialOptions } from "./credentials/gitHubActionsCredentialOptions.js";
|
|
40
42
|
export type { AuthorizationCodeCredentialOptions } from "./credentials/authorizationCodeCredentialOptions.js";
|
|
41
43
|
export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential.js";
|
|
42
44
|
export type { AzurePowerShellCredentialOptions } from "./credentials/azurePowerShellCredentialOptions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"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CAAC;AAC5F,YAAY,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AAC1G,YAAY,EACV,2BAA2B,EAC3B,iCAAiC,EACjC,sCAAsC,EACtC,oCAAoC,GACrC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,YAAY,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AAC5G,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,YAAY,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AAC5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,YAAY,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AAC5G,YAAY,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAChG,YAAY,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAErG,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,eAAe,CAE3D;AAED,OAAO,EAAE,sBAAsB,EAAE,KAAK,6BAA6B,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -38,6 +38,7 @@ __export(src_exports, {
|
|
|
38
38
|
DefaultAzureCredential: () => import_defaultAzureCredential2.DefaultAzureCredential,
|
|
39
39
|
DeviceCodeCredential: () => import_deviceCodeCredential.DeviceCodeCredential,
|
|
40
40
|
EnvironmentCredential: () => import_environmentCredential.EnvironmentCredential,
|
|
41
|
+
GitHubActionsCredential: () => import_gitHubActionsCredential.GitHubActionsCredential,
|
|
41
42
|
InteractiveBrowserCredential: () => import_interactiveBrowserCredential.InteractiveBrowserCredential,
|
|
42
43
|
ManagedIdentityCredential: () => import_managedIdentityCredential.ManagedIdentityCredential,
|
|
43
44
|
OnBehalfOfCredential: () => import_onBehalfOfCredential.OnBehalfOfCredential,
|
|
@@ -68,6 +69,7 @@ var import_managedIdentityCredential = require("./credentials/managedIdentityCre
|
|
|
68
69
|
var import_deviceCodeCredential = require("./credentials/deviceCodeCredential.js");
|
|
69
70
|
var import_azurePipelinesCredential = require("./credentials/azurePipelinesCredential.js");
|
|
70
71
|
var import_authorizationCodeCredential = require("./credentials/authorizationCodeCredential.js");
|
|
72
|
+
var import_gitHubActionsCredential = require("./credentials/gitHubActionsCredential.js");
|
|
71
73
|
var import_azurePowerShellCredential = require("./credentials/azurePowerShellCredential.js");
|
|
72
74
|
var import_usernamePasswordCredential = require("./credentials/usernamePasswordCredential.js");
|
|
73
75
|
var import_visualStudioCodeCredential = require("./credentials/visualStudioCodeCredential.js");
|
|
@@ -101,6 +103,7 @@ function getDefaultAzureCredential() {
|
|
|
101
103
|
DefaultAzureCredential,
|
|
102
104
|
DeviceCodeCredential,
|
|
103
105
|
EnvironmentCredential,
|
|
106
|
+
GitHubActionsCredential,
|
|
104
107
|
InteractiveBrowserCredential,
|
|
105
108
|
ManagedIdentityCredential,
|
|
106
109
|
OnBehalfOfCredential,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"#platform/plugins/consumer\";\n\nexport type { IdentityPlugin } from \"./plugins/provider.js\";\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\n\nexport {\n AuthenticationError,\n type ErrorResponse,\n AggregateAuthenticationError,\n AuthenticationErrorName,\n AggregateAuthenticationErrorName,\n CredentialUnavailableError,\n CredentialUnavailableErrorName,\n AuthenticationRequiredError,\n type AuthenticationRequiredErrorOptions,\n} from \"./errors.js\";\n\nexport type { AuthenticationRecord } from \"./msal/types.js\";\nexport { serializeAuthenticationRecord, deserializeAuthenticationRecord } from \"./msal/utils.js\";\nexport type { TokenCredentialOptions } from \"./tokenCredentialOptions.js\";\nexport type { MultiTenantTokenCredentialOptions } from \"./credentials/multiTenantTokenCredentialOptions.js\";\nexport type { AuthorityValidationOptions } from \"./credentials/authorityValidationOptions.js\";\n// TODO: Export again once we're ready to release this feature.\n// export { RegionalAuthority } from \"./regionalAuthority\";\n\nexport type { BrokerAuthOptions } from \"./credentials/brokerAuthOptions.js\";\nexport type {\n BrokerOptions,\n BrokerEnabledOptions,\n BrokerDisabledOptions,\n} from \"./msal/nodeFlows/brokerOptions.js\";\nexport type { InteractiveCredentialOptions } from \"./credentials/interactiveCredentialOptions.js\";\n\nexport { ChainedTokenCredential } from \"./credentials/chainedTokenCredential.js\";\n\nexport { ClientSecretCredential } from \"#platform/credentials/clientSecretCredential\";\nexport type { ClientSecretCredentialOptions } from \"./credentials/clientSecretCredentialOptions.js\";\n\nexport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\nexport type {\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialResourceIdOptions,\n DefaultAzureCredentialEnvVars,\n} from \"./credentials/defaultAzureCredentialOptions.js\";\n\nexport { EnvironmentCredential } from \"#platform/credentials/environmentCredential\";\nexport type { EnvironmentCredentialOptions } from \"./credentials/environmentCredentialOptions.js\";\n\nexport { ClientCertificateCredential } from \"#platform/credentials/clientCertificateCredential\";\nexport type {\n ClientCertificateCredentialPEMConfiguration,\n ClientCertificatePEMCertificatePath,\n ClientCertificatePEMCertificate,\n} from \"./credentials/clientCertificateCredentialModels.js\";\nexport type { ClientCertificateCredentialOptions } from \"./credentials/clientCertificateCredentialOptions.js\";\nexport { ClientAssertionCredential } from \"#platform/credentials/clientAssertionCredential\";\nexport type { ClientAssertionCredentialOptions } from \"./credentials/clientAssertionCredentialOptions.js\";\nexport type { CredentialPersistenceOptions } from \"./credentials/credentialPersistenceOptions.js\";\nexport { AzureCliCredential } from \"#platform/credentials/azureCliCredential\";\nexport type { AzureCliCredentialOptions } from \"./credentials/azureCliCredentialOptions.js\";\nexport { AzureDeveloperCliCredential } from \"#platform/credentials/azureDeveloperCliCredential\";\nexport type { AzureDeveloperCliCredentialOptions } from \"./credentials/azureDeveloperCliCredentialOptions.js\";\nexport { InteractiveBrowserCredential } from \"#platform/credentials/interactiveBrowserCredential\";\nexport type {\n InteractiveBrowserCredentialNodeOptions,\n InteractiveBrowserCredentialInBrowserOptions,\n BrowserLoginStyle,\n} from \"./credentials/interactiveBrowserCredentialOptions.js\";\nexport { ManagedIdentityCredential } from \"#platform/credentials/managedIdentityCredential/index\";\nexport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n} from \"./credentials/managedIdentityCredential/options.js\";\nexport { DeviceCodeCredential } from \"#platform/credentials/deviceCodeCredential\";\nexport type {\n DeviceCodePromptCallback,\n DeviceCodeInfo,\n} from \"./credentials/deviceCodeCredentialOptions.js\";\nexport type { DeviceCodeCredentialOptions } from \"./credentials/deviceCodeCredentialOptions.js\";\nexport { AzurePipelinesCredential as AzurePipelinesCredential } from \"#platform/credentials/azurePipelinesCredential\";\nexport type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from \"./credentials/azurePipelinesCredentialOptions.js\";\nexport { AuthorizationCodeCredential } from \"#platform/credentials/authorizationCodeCredential\";\nexport type { AuthorizationCodeCredentialOptions } from \"./credentials/authorizationCodeCredentialOptions.js\";\nexport { AzurePowerShellCredential } from \"#platform/credentials/azurePowerShellCredential\";\nexport type { AzurePowerShellCredentialOptions } from \"./credentials/azurePowerShellCredentialOptions.js\";\nexport type {\n OnBehalfOfCredentialOptions,\n OnBehalfOfCredentialSecretOptions,\n OnBehalfOfCredentialCertificateOptions,\n OnBehalfOfCredentialAssertionOptions,\n} from \"./credentials/onBehalfOfCredentialOptions.js\";\nexport { UsernamePasswordCredential } from \"#platform/credentials/usernamePasswordCredential\";\nexport type { UsernamePasswordCredentialOptions } from \"./credentials/usernamePasswordCredentialOptions.js\";\nexport { VisualStudioCodeCredential } from \"#platform/credentials/visualStudioCodeCredential\";\nexport type { VisualStudioCodeCredentialOptions } from \"./credentials/visualStudioCodeCredentialOptions.js\";\nexport { OnBehalfOfCredential } from \"#platform/credentials/onBehalfOfCredential\";\nexport { WorkloadIdentityCredential } from \"#platform/credentials/workloadIdentityCredential\";\nexport type { WorkloadIdentityCredentialOptions } from \"./credentials/workloadIdentityCredentialOptions.js\";\nexport type { BrowserCustomizationOptions } from \"./credentials/browserCustomizationOptions.js\";\nexport type { TokenCachePersistenceOptions } from \"./msal/nodeFlows/tokenCachePersistenceOptions.js\";\n\nexport type { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-auth\";\nexport { logger } from \"./util/logging.js\";\n\nexport { AzureAuthorityHosts } from \"./constants.js\";\n\n/**\n * Returns a new instance of the {@link DefaultAzureCredential}.\n */\nexport function getDefaultAzureCredential(): TokenCredential {\n return new DefaultAzureCredential();\n}\n\nexport { getBearerTokenProvider, type GetBearerTokenProviderOptions } from \"./tokenProvider.js\";\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,uCAHd;AAQA,oCAAuC;AAEvC,oBAUO;AAGP,mBAA+E;AAe/E,oCAAuC;AAEvC,oCAAuC;AAGvC,IAAAA,iCAAuC;AAQvC,mCAAsC;AAGtC,yCAA4C;AAO5C,uCAA0C;AAG1C,gCAAmC;AAEnC,yCAA4C;AAE5C,0CAA6C;AAM7C,uCAA0C;AAM1C,kCAAqC;AAMrC,sCAAqE;AAErE,yCAA4C;
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"#platform/plugins/consumer\";\n\nexport type { IdentityPlugin } from \"./plugins/provider.js\";\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\n\nexport {\n AuthenticationError,\n type ErrorResponse,\n AggregateAuthenticationError,\n AuthenticationErrorName,\n AggregateAuthenticationErrorName,\n CredentialUnavailableError,\n CredentialUnavailableErrorName,\n AuthenticationRequiredError,\n type AuthenticationRequiredErrorOptions,\n} from \"./errors.js\";\n\nexport type { AuthenticationRecord } from \"./msal/types.js\";\nexport { serializeAuthenticationRecord, deserializeAuthenticationRecord } from \"./msal/utils.js\";\nexport type { TokenCredentialOptions } from \"./tokenCredentialOptions.js\";\nexport type { MultiTenantTokenCredentialOptions } from \"./credentials/multiTenantTokenCredentialOptions.js\";\nexport type { AuthorityValidationOptions } from \"./credentials/authorityValidationOptions.js\";\n// TODO: Export again once we're ready to release this feature.\n// export { RegionalAuthority } from \"./regionalAuthority\";\n\nexport type { BrokerAuthOptions } from \"./credentials/brokerAuthOptions.js\";\nexport type {\n BrokerOptions,\n BrokerEnabledOptions,\n BrokerDisabledOptions,\n} from \"./msal/nodeFlows/brokerOptions.js\";\nexport type { InteractiveCredentialOptions } from \"./credentials/interactiveCredentialOptions.js\";\n\nexport { ChainedTokenCredential } from \"./credentials/chainedTokenCredential.js\";\n\nexport { ClientSecretCredential } from \"#platform/credentials/clientSecretCredential\";\nexport type { ClientSecretCredentialOptions } from \"./credentials/clientSecretCredentialOptions.js\";\n\nexport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\nexport type {\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialResourceIdOptions,\n DefaultAzureCredentialEnvVars,\n} from \"./credentials/defaultAzureCredentialOptions.js\";\n\nexport { EnvironmentCredential } from \"#platform/credentials/environmentCredential\";\nexport type { EnvironmentCredentialOptions } from \"./credentials/environmentCredentialOptions.js\";\n\nexport { ClientCertificateCredential } from \"#platform/credentials/clientCertificateCredential\";\nexport type {\n ClientCertificateCredentialPEMConfiguration,\n ClientCertificatePEMCertificatePath,\n ClientCertificatePEMCertificate,\n} from \"./credentials/clientCertificateCredentialModels.js\";\nexport type { ClientCertificateCredentialOptions } from \"./credentials/clientCertificateCredentialOptions.js\";\nexport { ClientAssertionCredential } from \"#platform/credentials/clientAssertionCredential\";\nexport type { ClientAssertionCredentialOptions } from \"./credentials/clientAssertionCredentialOptions.js\";\nexport type { CredentialPersistenceOptions } from \"./credentials/credentialPersistenceOptions.js\";\nexport { AzureCliCredential } from \"#platform/credentials/azureCliCredential\";\nexport type { AzureCliCredentialOptions } from \"./credentials/azureCliCredentialOptions.js\";\nexport { AzureDeveloperCliCredential } from \"#platform/credentials/azureDeveloperCliCredential\";\nexport type { AzureDeveloperCliCredentialOptions } from \"./credentials/azureDeveloperCliCredentialOptions.js\";\nexport { InteractiveBrowserCredential } from \"#platform/credentials/interactiveBrowserCredential\";\nexport type {\n InteractiveBrowserCredentialNodeOptions,\n InteractiveBrowserCredentialInBrowserOptions,\n BrowserLoginStyle,\n} from \"./credentials/interactiveBrowserCredentialOptions.js\";\nexport { ManagedIdentityCredential } from \"#platform/credentials/managedIdentityCredential/index\";\nexport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n} from \"./credentials/managedIdentityCredential/options.js\";\nexport { DeviceCodeCredential } from \"#platform/credentials/deviceCodeCredential\";\nexport type {\n DeviceCodePromptCallback,\n DeviceCodeInfo,\n} from \"./credentials/deviceCodeCredentialOptions.js\";\nexport type { DeviceCodeCredentialOptions } from \"./credentials/deviceCodeCredentialOptions.js\";\nexport { AzurePipelinesCredential as AzurePipelinesCredential } from \"#platform/credentials/azurePipelinesCredential\";\nexport type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from \"./credentials/azurePipelinesCredentialOptions.js\";\nexport { AuthorizationCodeCredential } from \"#platform/credentials/authorizationCodeCredential\";\nexport { GitHubActionsCredential } from \"#platform/credentials/gitHubActionsCredential\";\nexport type { GitHubActionsCredentialOptions } from \"./credentials/gitHubActionsCredentialOptions.js\";\nexport type { AuthorizationCodeCredentialOptions } from \"./credentials/authorizationCodeCredentialOptions.js\";\nexport { AzurePowerShellCredential } from \"#platform/credentials/azurePowerShellCredential\";\nexport type { AzurePowerShellCredentialOptions } from \"./credentials/azurePowerShellCredentialOptions.js\";\nexport type {\n OnBehalfOfCredentialOptions,\n OnBehalfOfCredentialSecretOptions,\n OnBehalfOfCredentialCertificateOptions,\n OnBehalfOfCredentialAssertionOptions,\n} from \"./credentials/onBehalfOfCredentialOptions.js\";\nexport { UsernamePasswordCredential } from \"#platform/credentials/usernamePasswordCredential\";\nexport type { UsernamePasswordCredentialOptions } from \"./credentials/usernamePasswordCredentialOptions.js\";\nexport { VisualStudioCodeCredential } from \"#platform/credentials/visualStudioCodeCredential\";\nexport type { VisualStudioCodeCredentialOptions } from \"./credentials/visualStudioCodeCredentialOptions.js\";\nexport { OnBehalfOfCredential } from \"#platform/credentials/onBehalfOfCredential\";\nexport { WorkloadIdentityCredential } from \"#platform/credentials/workloadIdentityCredential\";\nexport type { WorkloadIdentityCredentialOptions } from \"./credentials/workloadIdentityCredentialOptions.js\";\nexport type { BrowserCustomizationOptions } from \"./credentials/browserCustomizationOptions.js\";\nexport type { TokenCachePersistenceOptions } from \"./msal/nodeFlows/tokenCachePersistenceOptions.js\";\n\nexport type { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-auth\";\nexport { logger } from \"./util/logging.js\";\n\nexport { AzureAuthorityHosts } from \"./constants.js\";\n\n/**\n * Returns a new instance of the {@link DefaultAzureCredential}.\n */\nexport function getDefaultAzureCredential(): TokenCredential {\n return new DefaultAzureCredential();\n}\n\nexport { getBearerTokenProvider, type GetBearerTokenProviderOptions } from \"./tokenProvider.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAc,uCAHd;AAQA,oCAAuC;AAEvC,oBAUO;AAGP,mBAA+E;AAe/E,oCAAuC;AAEvC,oCAAuC;AAGvC,IAAAA,iCAAuC;AAQvC,mCAAsC;AAGtC,yCAA4C;AAO5C,uCAA0C;AAG1C,gCAAmC;AAEnC,yCAA4C;AAE5C,0CAA6C;AAM7C,uCAA0C;AAM1C,kCAAqC;AAMrC,sCAAqE;AAErE,yCAA4C;AAC5C,qCAAwC;AAGxC,uCAA0C;AAQ1C,wCAA2C;AAE3C,wCAA2C;AAE3C,kCAAqC;AACrC,wCAA2C;AAM3C,qBAAuB;AAEvB,uBAAoC;AASpC,2BAA2E;AAJpE,SAAS,4BAA6C;AAC3D,SAAO,IAAI,qDAAuB;AACpC;",
|
|
6
6
|
"names": ["import_defaultAzureCredential"]
|
|
7
7
|
}
|
package/dist/esm/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAE3C;;;GAGG;AAIH,eAAO,MAAM,uBAAuB,yCAAyC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,UAAU,mCAAmC;IAC7C;;;;;SAKK;IACL,YAAY,qCAAqC;IACjD;;OAEG;IACH,eAAe,qCAAqC;IACpD;;OAEG;IACH,gBAAgB,sCAAsC;CACvD;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uCAAuC,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,EAAU,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,eAAe,CAAC"}
|
package/dist/esm/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.15.0-beta.1`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth";
|
|
2
|
+
import type { GitHubActionsCredentialOptions } from "./gitHubActionsCredentialOptions.js";
|
|
3
|
+
import type { PipelineResponse } from "@azure/core-rest-pipeline";
|
|
4
|
+
/**
|
|
5
|
+
* Derives the OIDC audience from the authority host for sovereign cloud support.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare function deriveAudience(authorityHost: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Enables authentication to Microsoft Entra ID using GitHub Actions
|
|
11
|
+
* OIDC federated identity credentials.
|
|
12
|
+
*
|
|
13
|
+
* This credential is designed for use in GitHub Actions workflows that have
|
|
14
|
+
* `permissions: id-token: write` configured. It reads the following environment
|
|
15
|
+
* variables:
|
|
16
|
+
* - `AZURE_TENANT_ID` — The Entra ID tenant.
|
|
17
|
+
* - `AZURE_CLIENT_ID` — The client ID of the app registration with a federated identity credential.
|
|
18
|
+
* - `ACTIONS_ID_TOKEN_REQUEST_URL` — Set automatically by GitHub Actions runner.
|
|
19
|
+
* - `ACTIONS_ID_TOKEN_REQUEST_TOKEN` — Set automatically by GitHub Actions runner.
|
|
20
|
+
*/
|
|
21
|
+
export declare class GitHubActionsCredential implements TokenCredential {
|
|
22
|
+
private clientAssertionCredential;
|
|
23
|
+
private identityClient;
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new instance of GitHubActionsCredential.
|
|
26
|
+
*
|
|
27
|
+
* Reads `AZURE_TENANT_ID` and `AZURE_CLIENT_ID` from environment variables,
|
|
28
|
+
* as well as GitHub Actions OIDC variables `ACTIONS_ID_TOKEN_REQUEST_URL` and
|
|
29
|
+
* `ACTIONS_ID_TOKEN_REQUEST_TOKEN`.
|
|
30
|
+
*
|
|
31
|
+
* @param options - Options to configure the credential.
|
|
32
|
+
*/
|
|
33
|
+
constructor(options?: GitHubActionsCredentialOptions);
|
|
34
|
+
/**
|
|
35
|
+
* Authenticates with Microsoft Entra ID and returns an access token if successful.
|
|
36
|
+
* If authentication fails, a {@link CredentialUnavailableError} or
|
|
37
|
+
* {@link AuthenticationError} will be thrown with the details of the failure.
|
|
38
|
+
*
|
|
39
|
+
* @param scopes - The list of scopes for which the token will have access.
|
|
40
|
+
* @param options - The options used to configure any requests this
|
|
41
|
+
* TokenCredential implementation might make.
|
|
42
|
+
*/
|
|
43
|
+
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
|
|
44
|
+
/**
|
|
45
|
+
* Requests an OIDC token from the GitHub Actions OIDC provider.
|
|
46
|
+
*/
|
|
47
|
+
private requestOidcToken;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Parses the OIDC token response from GitHub's OIDC provider.
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare function handleOidcResponse(response: PipelineResponse): string;
|
|
54
|
+
//# sourceMappingURL=gitHubActionsCredential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitHubActionsCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAItF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAG1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAgClE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAc5D;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAwB,YAAW,eAAe;IAC7D,OAAO,CAAC,yBAAyB,CAA4B;IAC7D,OAAO,CAAC,cAAc,CAAiB;IAEvC;;;;;;;;OAQG;gBACS,OAAO,GAAE,8BAAmC;IA0CxD;;;;;;;;OAQG;IACU,QAAQ,CACnB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EACzB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,WAAW,CAAC;IAKvB;;OAEG;YACW,gBAAgB;CAuB/B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CA8CrE"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { AuthenticationError, CredentialUnavailableError } from "../errors.js";
|
|
4
|
+
import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
|
|
5
|
+
import { ClientAssertionCredential } from "./clientAssertionCredential.js";
|
|
6
|
+
import { IdentityClient } from "../client/identityClient.js";
|
|
7
|
+
import { checkTenantId } from "../util/tenantIdUtils.js";
|
|
8
|
+
import { credentialLogger } from "../util/logging.js";
|
|
9
|
+
import { getAuthorityHost } from "../util/authorityHost.js";
|
|
10
|
+
const credentialName = "GitHubActionsCredential";
|
|
11
|
+
const logger = credentialLogger(credentialName);
|
|
12
|
+
const troubleshootingGuide = "https://aka.ms/azsdk/js/identity/troubleshoot";
|
|
13
|
+
const ErrorMessages = {
|
|
14
|
+
TENANT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_TENANT_ID environment variable to use this credential.`,
|
|
15
|
+
CLIENT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_CLIENT_ID environment variable to use this credential.`,
|
|
16
|
+
GITHUB_ENV_VARS_REQUIRED: (missing) => `${credentialName}: is unavailable. Ensure that you're running this task in a GitHub Actions workflow with 'permissions: id-token: write' so that the following missing system variable(s) can be defined: ${missing}. See the troubleshooting guide for more information: ${troubleshootingGuide}`,
|
|
17
|
+
UNSUPPORTED_AUTHORITY_HOST: (authorityHost) => `${credentialName}: is unavailable. The authority host "${authorityHost}" is not supported.`,
|
|
18
|
+
NULL_OIDC_TOKEN: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,
|
|
19
|
+
OIDC_REQUEST_FAILED: (status) => `${credentialName}: Authentication Failed. OIDC request returned status code ${status}.`,
|
|
20
|
+
OIDC_VALUE_MISSING: `${credentialName}: Authentication Failed. "value" field not detected in the response.`,
|
|
21
|
+
OIDC_RESPONSE_PARSE_FAILED: `${credentialName}: Authentication Failed. Failed to parse OIDC response.`,
|
|
22
|
+
};
|
|
23
|
+
const audienceByAuthorityHost = {
|
|
24
|
+
"login.microsoftonline.com": "api://AzureADTokenExchange",
|
|
25
|
+
"login.chinacloudapi.cn": "api://AzureADTokenExchangeChina",
|
|
26
|
+
"login.microsoftonline.us": "api://AzureADTokenExchangeUSGov",
|
|
27
|
+
"login.sovcloud-identity.fr": "api://AzureADTokenExchangeFrance",
|
|
28
|
+
"login.sovcloud-identity.de": "api://AzureADTokenExchangeGermany",
|
|
29
|
+
"login.sovcloud-identity.sg": "api://AzureADTokenExchangeGovSG",
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Derives the OIDC audience from the authority host for sovereign cloud support.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export function deriveAudience(authorityHost) {
|
|
36
|
+
let hostname;
|
|
37
|
+
try {
|
|
38
|
+
hostname = new URL(authorityHost).hostname.toLowerCase();
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
throw new CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));
|
|
42
|
+
}
|
|
43
|
+
const audience = audienceByAuthorityHost[hostname];
|
|
44
|
+
if (!audience) {
|
|
45
|
+
throw new CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));
|
|
46
|
+
}
|
|
47
|
+
return audience;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Enables authentication to Microsoft Entra ID using GitHub Actions
|
|
51
|
+
* OIDC federated identity credentials.
|
|
52
|
+
*
|
|
53
|
+
* This credential is designed for use in GitHub Actions workflows that have
|
|
54
|
+
* `permissions: id-token: write` configured. It reads the following environment
|
|
55
|
+
* variables:
|
|
56
|
+
* - `AZURE_TENANT_ID` — The Entra ID tenant.
|
|
57
|
+
* - `AZURE_CLIENT_ID` — The client ID of the app registration with a federated identity credential.
|
|
58
|
+
* - `ACTIONS_ID_TOKEN_REQUEST_URL` — Set automatically by GitHub Actions runner.
|
|
59
|
+
* - `ACTIONS_ID_TOKEN_REQUEST_TOKEN` — Set automatically by GitHub Actions runner.
|
|
60
|
+
*/
|
|
61
|
+
export class GitHubActionsCredential {
|
|
62
|
+
clientAssertionCredential;
|
|
63
|
+
identityClient;
|
|
64
|
+
/**
|
|
65
|
+
* Creates a new instance of GitHubActionsCredential.
|
|
66
|
+
*
|
|
67
|
+
* Reads `AZURE_TENANT_ID` and `AZURE_CLIENT_ID` from environment variables,
|
|
68
|
+
* as well as GitHub Actions OIDC variables `ACTIONS_ID_TOKEN_REQUEST_URL` and
|
|
69
|
+
* `ACTIONS_ID_TOKEN_REQUEST_TOKEN`.
|
|
70
|
+
*
|
|
71
|
+
* @param options - Options to configure the credential.
|
|
72
|
+
*/
|
|
73
|
+
constructor(options = {}) {
|
|
74
|
+
const tenantId = process.env.AZURE_TENANT_ID;
|
|
75
|
+
const clientId = process.env.AZURE_CLIENT_ID;
|
|
76
|
+
if (!tenantId) {
|
|
77
|
+
throw new CredentialUnavailableError(ErrorMessages.TENANT_ID_REQUIRED);
|
|
78
|
+
}
|
|
79
|
+
if (!clientId) {
|
|
80
|
+
throw new CredentialUnavailableError(ErrorMessages.CLIENT_ID_REQUIRED);
|
|
81
|
+
}
|
|
82
|
+
this.identityClient = new IdentityClient(options);
|
|
83
|
+
checkTenantId(logger, tenantId);
|
|
84
|
+
const oidcRequestUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
|
|
85
|
+
const oidcRequestToken = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
|
|
86
|
+
if (!oidcRequestUrl || !oidcRequestToken) {
|
|
87
|
+
const missing = [
|
|
88
|
+
!oidcRequestUrl ? "ACTIONS_ID_TOKEN_REQUEST_URL" : "",
|
|
89
|
+
!oidcRequestToken ? "ACTIONS_ID_TOKEN_REQUEST_TOKEN" : "",
|
|
90
|
+
]
|
|
91
|
+
.filter(Boolean)
|
|
92
|
+
.join(", ");
|
|
93
|
+
throw new CredentialUnavailableError(ErrorMessages.GITHUB_ENV_VARS_REQUIRED(missing));
|
|
94
|
+
}
|
|
95
|
+
const authorityHost = getAuthorityHost(options);
|
|
96
|
+
const audience = deriveAudience(authorityHost);
|
|
97
|
+
logger.info(`Invoking GitHubActionsCredential with tenant ID: ${tenantId}, client ID: ${clientId}`);
|
|
98
|
+
this.clientAssertionCredential = new ClientAssertionCredential(tenantId, clientId, this.requestOidcToken.bind(this, oidcRequestUrl, oidcRequestToken, audience), options);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Authenticates with Microsoft Entra ID and returns an access token if successful.
|
|
102
|
+
* If authentication fails, a {@link CredentialUnavailableError} or
|
|
103
|
+
* {@link AuthenticationError} will be thrown with the details of the failure.
|
|
104
|
+
*
|
|
105
|
+
* @param scopes - The list of scopes for which the token will have access.
|
|
106
|
+
* @param options - The options used to configure any requests this
|
|
107
|
+
* TokenCredential implementation might make.
|
|
108
|
+
*/
|
|
109
|
+
async getToken(scopes, options) {
|
|
110
|
+
logger.getToken.info(`Using the scopes ${Array.isArray(scopes) ? scopes.join(", ") : scopes}`);
|
|
111
|
+
return this.clientAssertionCredential.getToken(scopes, options);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Requests an OIDC token from the GitHub Actions OIDC provider.
|
|
115
|
+
*/
|
|
116
|
+
async requestOidcToken(oidcRequestUrl, oidcRequestToken, audience) {
|
|
117
|
+
logger.info("Requesting OIDC token from GitHub Actions...");
|
|
118
|
+
// GitHub OIDC endpoint uses GET (not POST like Azure Pipelines).
|
|
119
|
+
// Audience is appended as a query parameter.
|
|
120
|
+
const url = new URL(oidcRequestUrl);
|
|
121
|
+
url.searchParams.set("audience", audience);
|
|
122
|
+
const request = createPipelineRequest({
|
|
123
|
+
url: url.toString(),
|
|
124
|
+
method: "GET",
|
|
125
|
+
headers: createHttpHeaders({
|
|
126
|
+
Authorization: `Bearer ${oidcRequestToken}`,
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
const response = await this.identityClient.sendRequest(request);
|
|
130
|
+
return handleOidcResponse(response);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Parses the OIDC token response from GitHub's OIDC provider.
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
export function handleOidcResponse(response) {
|
|
138
|
+
const text = response.bodyAsText;
|
|
139
|
+
if (!text) {
|
|
140
|
+
logger.error(`${ErrorMessages.NULL_OIDC_TOKEN} Status code: ${response.status}.`);
|
|
141
|
+
throw new AuthenticationError(response.status, {
|
|
142
|
+
error: ErrorMessages.NULL_OIDC_TOKEN,
|
|
143
|
+
error_description: `Status code: ${response.status}. See the troubleshooting guide for more information: ${troubleshootingGuide}`,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (response.status !== 200) {
|
|
147
|
+
const errorMessage = ErrorMessages.OIDC_REQUEST_FAILED(response.status);
|
|
148
|
+
logger.error(errorMessage);
|
|
149
|
+
throw new AuthenticationError(response.status, {
|
|
150
|
+
error: errorMessage,
|
|
151
|
+
error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
let result;
|
|
155
|
+
try {
|
|
156
|
+
result = JSON.parse(text);
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
logger.error(ErrorMessages.OIDC_RESPONSE_PARSE_FAILED);
|
|
160
|
+
throw new AuthenticationError(response.status, {
|
|
161
|
+
error: ErrorMessages.OIDC_RESPONSE_PARSE_FAILED,
|
|
162
|
+
error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
if (typeof result === "object" &&
|
|
166
|
+
result !== null &&
|
|
167
|
+
"value" in result &&
|
|
168
|
+
typeof result.value === "string" &&
|
|
169
|
+
result.value) {
|
|
170
|
+
return result.value;
|
|
171
|
+
}
|
|
172
|
+
const errorMessage = ErrorMessages.OIDC_VALUE_MISSING;
|
|
173
|
+
logger.error(errorMessage);
|
|
174
|
+
throw new AuthenticationError(response.status, {
|
|
175
|
+
error: errorMessage,
|
|
176
|
+
error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=gitHubActionsCredential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitHubActionsCredential.js","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC/E,O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AAE,YAAY;YACnB,iBAAiB,EAAE,uDAAuD,oBAAoB,EAAE;SACjG,CAAC,CAAC;IACL,CAAC;IAED,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAY,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;QACvD,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC7C,KAAK,EAAE,aAAa,CAAC,0BAA0B;YAC/C,iBAAiB,EAAE,uDAAuD,oBAAoB,EAAE;SACjG,CAAC,CAAC;IACL,CAAC;IAED,IACE,OAAO,MAAM,KAAK,QAAQ;QAC1B,MAAM,KAAK,IAAI;QACf,OAAO,IAAI,MAAM;QACjB,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;QAChC,MAAM,CAAC,KAAK,EACZ,CAAC;QACD,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,MAAM,YAAY,GAAG,aAAa,CAAC,kBAAkB,CAAC;IACtD,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE;QAC7C,KAAK,EAAE,YAAY;QACnB,iBAAiB,EAAE,uDAAuD,oBAAoB,EAAE;KACjG,CAAC,CAAC;AACL,CAAC","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 { GitHubActionsCredentialOptions } from \"./gitHubActionsCredentialOptions.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\";\nimport { getAuthorityHost } from \"../util/authorityHost.js\";\n\nconst credentialName = \"GitHubActionsCredential\";\nconst logger = credentialLogger(credentialName);\nconst troubleshootingGuide = \"https://aka.ms/azsdk/js/identity/troubleshoot\";\n\nconst ErrorMessages = {\n TENANT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_TENANT_ID environment variable to use this credential.`,\n CLIENT_ID_REQUIRED: `${credentialName}: is unavailable. Set the AZURE_CLIENT_ID environment variable to use this credential.`,\n GITHUB_ENV_VARS_REQUIRED: (missing: string) =>\n `${credentialName}: is unavailable. Ensure that you're running this task in a GitHub Actions workflow with 'permissions: id-token: write' so that the following missing system variable(s) can be defined: ${missing}. See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n UNSUPPORTED_AUTHORITY_HOST: (authorityHost: string) =>\n `${credentialName}: is unavailable. The authority host \"${authorityHost}\" is not supported.`,\n NULL_OIDC_TOKEN: `${credentialName}: Authentication Failed. Received null token from OIDC request.`,\n OIDC_REQUEST_FAILED: (status: number) =>\n `${credentialName}: Authentication Failed. OIDC request returned status code ${status}.`,\n OIDC_VALUE_MISSING: `${credentialName}: Authentication Failed. \"value\" field not detected in the response.`,\n OIDC_RESPONSE_PARSE_FAILED: `${credentialName}: Authentication Failed. Failed to parse OIDC response.`,\n};\n\nconst audienceByAuthorityHost: Readonly<Record<string, string>> = {\n \"login.microsoftonline.com\": \"api://AzureADTokenExchange\",\n \"login.chinacloudapi.cn\": \"api://AzureADTokenExchangeChina\",\n \"login.microsoftonline.us\": \"api://AzureADTokenExchangeUSGov\",\n \"login.sovcloud-identity.fr\": \"api://AzureADTokenExchangeFrance\",\n \"login.sovcloud-identity.de\": \"api://AzureADTokenExchangeGermany\",\n \"login.sovcloud-identity.sg\": \"api://AzureADTokenExchangeGovSG\",\n};\n\n/**\n * Derives the OIDC audience from the authority host for sovereign cloud support.\n * @internal\n */\nexport function deriveAudience(authorityHost: string): string {\n let hostname: string;\n try {\n hostname = new URL(authorityHost).hostname.toLowerCase();\n } catch {\n throw new CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));\n }\n\n const audience = audienceByAuthorityHost[hostname];\n if (!audience) {\n throw new CredentialUnavailableError(ErrorMessages.UNSUPPORTED_AUTHORITY_HOST(authorityHost));\n }\n\n return audience;\n}\n\n/**\n * Enables authentication to Microsoft Entra ID using GitHub Actions\n * OIDC federated identity credentials.\n *\n * This credential is designed for use in GitHub Actions workflows that have\n * `permissions: id-token: write` configured. It reads the following environment\n * variables:\n * - `AZURE_TENANT_ID` — The Entra ID tenant.\n * - `AZURE_CLIENT_ID` — The client ID of the app registration with a federated identity credential.\n * - `ACTIONS_ID_TOKEN_REQUEST_URL` — Set automatically by GitHub Actions runner.\n * - `ACTIONS_ID_TOKEN_REQUEST_TOKEN` — Set automatically by GitHub Actions runner.\n */\nexport class GitHubActionsCredential implements TokenCredential {\n private clientAssertionCredential: ClientAssertionCredential;\n private identityClient: IdentityClient;\n\n /**\n * Creates a new instance of GitHubActionsCredential.\n *\n * Reads `AZURE_TENANT_ID` and `AZURE_CLIENT_ID` from environment variables,\n * as well as GitHub Actions OIDC variables `ACTIONS_ID_TOKEN_REQUEST_URL` and\n * `ACTIONS_ID_TOKEN_REQUEST_TOKEN`.\n *\n * @param options - Options to configure the credential.\n */\n constructor(options: GitHubActionsCredentialOptions = {}) {\n const tenantId = process.env.AZURE_TENANT_ID;\n const clientId = process.env.AZURE_CLIENT_ID;\n\n if (!tenantId) {\n throw new CredentialUnavailableError(ErrorMessages.TENANT_ID_REQUIRED);\n }\n if (!clientId) {\n throw new CredentialUnavailableError(ErrorMessages.CLIENT_ID_REQUIRED);\n }\n\n this.identityClient = new IdentityClient(options);\n checkTenantId(logger, tenantId);\n\n const oidcRequestUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;\n const oidcRequestToken = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;\n\n if (!oidcRequestUrl || !oidcRequestToken) {\n const missing = [\n !oidcRequestUrl ? \"ACTIONS_ID_TOKEN_REQUEST_URL\" : \"\",\n !oidcRequestToken ? \"ACTIONS_ID_TOKEN_REQUEST_TOKEN\" : \"\",\n ]\n .filter(Boolean)\n .join(\", \");\n throw new CredentialUnavailableError(ErrorMessages.GITHUB_ENV_VARS_REQUIRED(missing));\n }\n\n const authorityHost = getAuthorityHost(options);\n const audience = deriveAudience(authorityHost);\n\n logger.info(\n `Invoking GitHubActionsCredential with tenant ID: ${tenantId}, client ID: ${clientId}`,\n );\n\n this.clientAssertionCredential = new ClientAssertionCredential(\n tenantId,\n clientId,\n this.requestOidcToken.bind(this, oidcRequestUrl, oidcRequestToken, audience),\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\n * {@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 logger.getToken.info(`Using the scopes ${Array.isArray(scopes) ? scopes.join(\", \") : scopes}`);\n return this.clientAssertionCredential.getToken(scopes, options);\n }\n\n /**\n * Requests an OIDC token from the GitHub Actions OIDC provider.\n */\n private async requestOidcToken(\n oidcRequestUrl: string,\n oidcRequestToken: string,\n audience: string,\n ): Promise<string> {\n logger.info(\"Requesting OIDC token from GitHub Actions...\");\n\n // GitHub OIDC endpoint uses GET (not POST like Azure Pipelines).\n // Audience is appended as a query parameter.\n const url = new URL(oidcRequestUrl);\n url.searchParams.set(\"audience\", audience);\n\n const request = createPipelineRequest({\n url: url.toString(),\n method: \"GET\",\n headers: createHttpHeaders({\n Authorization: `Bearer ${oidcRequestToken}`,\n }),\n });\n\n const response = await this.identityClient.sendRequest(request);\n return handleOidcResponse(response);\n }\n}\n\n/**\n * Parses the OIDC token response from GitHub's OIDC provider.\n * @internal\n */\nexport function handleOidcResponse(response: PipelineResponse): string {\n const text = response.bodyAsText;\n if (!text) {\n logger.error(`${ErrorMessages.NULL_OIDC_TOKEN} Status code: ${response.status}.`);\n throw new AuthenticationError(response.status, {\n error: ErrorMessages.NULL_OIDC_TOKEN,\n error_description: `Status code: ${response.status}. See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n });\n }\n\n if (response.status !== 200) {\n const errorMessage = ErrorMessages.OIDC_REQUEST_FAILED(response.status);\n logger.error(errorMessage);\n throw new AuthenticationError(response.status, {\n error: errorMessage,\n error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n });\n }\n\n let result: unknown;\n try {\n result = JSON.parse(text) as unknown;\n } catch {\n logger.error(ErrorMessages.OIDC_RESPONSE_PARSE_FAILED);\n throw new AuthenticationError(response.status, {\n error: ErrorMessages.OIDC_RESPONSE_PARSE_FAILED,\n error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,\n });\n }\n\n if (\n typeof result === \"object\" &&\n result !== null &&\n \"value\" in result &&\n typeof result.value === \"string\" &&\n result.value\n ) {\n return result.value;\n }\n\n const errorMessage = ErrorMessages.OIDC_VALUE_MISSING;\n logger.error(errorMessage);\n throw new AuthenticationError(response.status, {\n error: errorMessage,\n error_description: `See the troubleshooting guide for more information: ${troubleshootingGuide}`,\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 GitHubActionsCredential} class.
|
|
6
|
+
*/
|
|
7
|
+
export interface GitHubActionsCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions, AuthorityValidationOptions {
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=gitHubActionsCredentialOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitHubActionsCredentialOptions.d.ts","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredentialOptions.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,8BACf,SACE,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitHubActionsCredentialOptions.js","sourceRoot":"","sources":["../../../src/credentials/gitHubActionsCredentialOptions.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 GitHubActionsCredential} class.\n */\nexport interface GitHubActionsCredentialOptions\n extends\n MultiTenantTokenCredentialOptions,\n CredentialPersistenceOptions,\n AuthorityValidationOptions {}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export type { DeviceCodeCredentialOptions } from "./credentials/deviceCodeCreden
|
|
|
37
37
|
export { AzurePipelinesCredential as AzurePipelinesCredential } from "./credentials/azurePipelinesCredential.js";
|
|
38
38
|
export type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from "./credentials/azurePipelinesCredentialOptions.js";
|
|
39
39
|
export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential.js";
|
|
40
|
+
export { GitHubActionsCredential } from "./credentials/gitHubActionsCredential.js";
|
|
41
|
+
export type { GitHubActionsCredentialOptions } from "./credentials/gitHubActionsCredentialOptions.js";
|
|
40
42
|
export type { AuthorizationCodeCredentialOptions } from "./credentials/authorizationCodeCredentialOptions.js";
|
|
41
43
|
export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential.js";
|
|
42
44
|
export type { AzurePowerShellCredentialOptions } from "./credentials/azurePowerShellCredentialOptions.js";
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,4BAA4B,CAAC;AAE3C,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,KAAK,kCAAkC,GACxC,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AACjG,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,YAAY,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AAC5G,YAAY,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAI9F,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,4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E,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,eAAe,CAE3D;AAED,OAAO,EAAE,sBAAsB,EAAE,KAAK,6BAA6B,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { ManagedIdentityCredential } from "./credentials/managedIdentityCredenti
|
|
|
17
17
|
export { DeviceCodeCredential } from "./credentials/deviceCodeCredential.js";
|
|
18
18
|
export { AzurePipelinesCredential as AzurePipelinesCredential } from "./credentials/azurePipelinesCredential.js";
|
|
19
19
|
export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential.js";
|
|
20
|
+
export { GitHubActionsCredential } from "./credentials/gitHubActionsCredential.js";
|
|
20
21
|
export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential.js";
|
|
21
22
|
export { UsernamePasswordCredential } from "./credentials/usernamePasswordCredential.js";
|
|
22
23
|
export { VisualStudioCodeCredential } from "./credentials/visualStudioCodeCredential.js";
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,4BAA4B,CAAC;AAK3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EACL,mBAAmB,EAEnB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,GAE5B,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAejG,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAEjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8C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OhG,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAG5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAEhG,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAMlG,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAMlG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAMlF,OAAO,EAAE,wBAAwB,IAAI,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAEtH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAQ5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAE9F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAE9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAM9F,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,IAAI,sBAAsB,EAAE,CAAC;AACtC,CAAC;AAED,OAAO,EAAE,sBAAsB,EAAsC,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"#platform/plugins/consumer\";\n\nexport type { IdentityPlugin } from \"./plugins/provider.js\";\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\n\nexport {\n AuthenticationError,\n type ErrorResponse,\n AggregateAuthenticationError,\n AuthenticationErrorName,\n AggregateAuthenticationErrorName,\n CredentialUnavailableError,\n CredentialUnavailableErrorName,\n AuthenticationRequiredError,\n type AuthenticationRequiredErrorOptions,\n} from \"./errors.js\";\n\nexport type { AuthenticationRecord } from \"./msal/types.js\";\nexport { serializeAuthenticationRecord, deserializeAuthenticationRecord } from \"./msal/utils.js\";\nexport type { TokenCredentialOptions } from \"./tokenCredentialOptions.js\";\nexport type { MultiTenantTokenCredentialOptions } from \"./credentials/multiTenantTokenCredentialOptions.js\";\nexport type { AuthorityValidationOptions } from \"./credentials/authorityValidationOptions.js\";\n// TODO: Export again once we're ready to release this feature.\n// export { RegionalAuthority } from \"./regionalAuthority\";\n\nexport type { BrokerAuthOptions } from \"./credentials/brokerAuthOptions.js\";\nexport type {\n BrokerOptions,\n BrokerEnabledOptions,\n BrokerDisabledOptions,\n} from \"./msal/nodeFlows/brokerOptions.js\";\nexport type { InteractiveCredentialOptions } from \"./credentials/interactiveCredentialOptions.js\";\n\nexport { ChainedTokenCredential } from \"./credentials/chainedTokenCredential.js\";\n\nexport { ClientSecretCredential } from \"#platform/credentials/clientSecretCredential\";\nexport type { ClientSecretCredentialOptions } from \"./credentials/clientSecretCredentialOptions.js\";\n\nexport { DefaultAzureCredential } from \"#platform/credentials/defaultAzureCredential\";\nexport type {\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialResourceIdOptions,\n DefaultAzureCredentialEnvVars,\n} from \"./credentials/defaultAzureCredentialOptions.js\";\n\nexport { EnvironmentCredential } from \"#platform/credentials/environmentCredential\";\nexport type { EnvironmentCredentialOptions } from \"./credentials/environmentCredentialOptions.js\";\n\nexport { ClientCertificateCredential } from \"#platform/credentials/clientCertificateCredential\";\nexport type {\n ClientCertificateCredentialPEMConfiguration,\n ClientCertificatePEMCertificatePath,\n ClientCertificatePEMCertificate,\n} from \"./credentials/clientCertificateCredentialModels.js\";\nexport type { ClientCertificateCredentialOptions } from \"./credentials/clientCertificateCredentialOptions.js\";\nexport { ClientAssertionCredential } from \"#platform/credentials/clientAssertionCredential\";\nexport type { ClientAssertionCredentialOptions } from \"./credentials/clientAssertionCredentialOptions.js\";\nexport type { CredentialPersistenceOptions } from \"./credentials/credentialPersistenceOptions.js\";\nexport { AzureCliCredential } from \"#platform/credentials/azureCliCredential\";\nexport type { AzureCliCredentialOptions } from \"./credentials/azureCliCredentialOptions.js\";\nexport { AzureDeveloperCliCredential } from \"#platform/credentials/azureDeveloperCliCredential\";\nexport type { AzureDeveloperCliCredentialOptions } from \"./credentials/azureDeveloperCliCredentialOptions.js\";\nexport { InteractiveBrowserCredential } from \"#platform/credentials/interactiveBrowserCredential\";\nexport type {\n InteractiveBrowserCredentialNodeOptions,\n InteractiveBrowserCredentialInBrowserOptions,\n BrowserLoginStyle,\n} from \"./credentials/interactiveBrowserCredentialOptions.js\";\nexport { ManagedIdentityCredential } from \"#platform/credentials/managedIdentityCredential/index\";\nexport type {\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n} from \"./credentials/managedIdentityCredential/options.js\";\nexport { DeviceCodeCredential } from \"#platform/credentials/deviceCodeCredential\";\nexport type {\n DeviceCodePromptCallback,\n DeviceCodeInfo,\n} from \"./credentials/deviceCodeCredentialOptions.js\";\nexport type { DeviceCodeCredentialOptions } from \"./credentials/deviceCodeCredentialOptions.js\";\nexport { AzurePipelinesCredential as AzurePipelinesCredential } from \"#platform/credentials/azurePipelinesCredential\";\nexport type { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from \"./credentials/azurePipelinesCredentialOptions.js\";\nexport { AuthorizationCodeCredential } from \"#platform/credentials/authorizationCodeCredential\";\nexport { GitHubActionsCredential } from \"#platform/credentials/gitHubActionsCredential\";\nexport type { GitHubActionsCredentialOptions } from \"./credentials/gitHubActionsCredentialOptions.js\";\nexport type { AuthorizationCodeCredentialOptions } from \"./credentials/authorizationCodeCredentialOptions.js\";\nexport { AzurePowerShellCredential } from \"#platform/credentials/azurePowerShellCredential\";\nexport type { AzurePowerShellCredentialOptions } from \"./credentials/azurePowerShellCredentialOptions.js\";\nexport type {\n OnBehalfOfCredentialOptions,\n OnBehalfOfCredentialSecretOptions,\n OnBehalfOfCredentialCertificateOptions,\n OnBehalfOfCredentialAssertionOptions,\n} from \"./credentials/onBehalfOfCredentialOptions.js\";\nexport { UsernamePasswordCredential } from \"#platform/credentials/usernamePasswordCredential\";\nexport type { UsernamePasswordCredentialOptions } from \"./credentials/usernamePasswordCredentialOptions.js\";\nexport { VisualStudioCodeCredential } from \"#platform/credentials/visualStudioCodeCredential\";\nexport type { VisualStudioCodeCredentialOptions } from \"./credentials/visualStudioCodeCredentialOptions.js\";\nexport { OnBehalfOfCredential } from \"#platform/credentials/onBehalfOfCredential\";\nexport { WorkloadIdentityCredential } from \"#platform/credentials/workloadIdentityCredential\";\nexport type { WorkloadIdentityCredentialOptions } from \"./credentials/workloadIdentityCredentialOptions.js\";\nexport type { BrowserCustomizationOptions } from \"./credentials/browserCustomizationOptions.js\";\nexport type { TokenCachePersistenceOptions } from \"./msal/nodeFlows/tokenCachePersistenceOptions.js\";\n\nexport type { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-auth\";\nexport { logger } from \"./util/logging.js\";\n\nexport { AzureAuthorityHosts } from \"./constants.js\";\n\n/**\n * Returns a new instance of the {@link DefaultAzureCredential}.\n */\nexport function getDefaultAzureCredential(): TokenCredential {\n return new DefaultAzureCredential();\n}\n\nexport { getBearerTokenProvider, type GetBearerTokenProviderOptions } from \"./tokenProvider.js\";\n"]}
|
package/dist/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAE3C;;;GAGG;AAIH,eAAO,MAAM,uBAAuB,yCAAyC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,UAAU,mCAAmC;IAC7C;;;;;SAKK;IACL,YAAY,qCAAqC;IACjD;;OAEG;IACH,eAAe,qCAAqC;IACpD;;OAEG;IACH,gBAAgB,sCAAsC;CACvD;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uCAAuC,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,EAAU,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAE3C;;;GAGG;AACH,2EAA2E;AAC3E,6CAA6C;AAC7C,uGAAuG;AACvG,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,oEAA6C,CAAA;IAC7C;;;;;SAKK;IACL,wEAAiD,CAAA;IACjD;;OAEG;IACH,2EAAoD,CAAA;IACpD;;OAEG;IACH,6EAAsD,CAAA;AACxD,CAAC,EApBW,mBAAmB,KAAnB,mBAAmB,QAoB9B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAa,CAAC,GAAG,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/identity` package.\n */\nexport const SDK_VERSION = `4.15.0-beta.1`;\n\n/**\n * The default client ID for authentication\n * @internal\n */\n// TODO: temporary - this is the Azure CLI clientID - we'll replace it when\n// Developer Sign On application is available\n// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/src/Constants.cs#L9\nexport const DeveloperSignOnClientId = \"04b07795-8ddb-461a-bbee-02f9e1bf7b46\";\n\n/**\n * The default tenant for authentication\n * @internal\n */\nexport const DefaultTenantId = \"common\";\n\n/**\n * A list of known Azure authority hosts\n */\nexport enum AzureAuthorityHosts {\n /**\n * China-based Azure Authority Host\n */\n AzureChina = \"https://login.chinacloudapi.cn\",\n /**\n * Germany-based Azure Authority Host\n *\n * @deprecated Microsoft Cloud Germany was closed on October 29th, 2021.\n *\n * */\n AzureGermany = \"https://login.microsoftonline.de\",\n /**\n * US Government Azure Authority Host\n */\n AzureGovernment = \"https://login.microsoftonline.us\",\n /**\n * Public Cloud Azure Authority Host\n */\n AzurePublicCloud = \"https://login.microsoftonline.com\",\n}\n\n/**\n * @internal\n * The default authority host.\n */\nexport const DefaultAuthorityHost = AzureAuthorityHosts.AzurePublicCloud;\n\n/**\n * @internal\n * The default environment host for Azure Public Cloud\n */\nexport const DefaultAuthority = \"login.microsoftonline.com\";\n\n/**\n * @internal\n * Allow acquiring tokens for any tenant for multi-tentant auth.\n */\nexport const ALL_TENANTS: string[] = [\"*\"];\n\n/**\n * @internal\n */\nexport const CACHE_CAE_SUFFIX = \"cae\";\n\n/**\n * @internal\n */\nexport const CACHE_NON_CAE_SUFFIX = \"nocae\";\n\n/**\n * @internal\n *\n * The default name for the cache persistence plugin.\n * Matches the constant defined in the cache persistence package.\n */\nexport const DEFAULT_TOKEN_CACHE_NAME = \"msal.cache\";\n"]}
|