@azure/identity 3.3.2-alpha.20231016.2 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @azure/identity might be problematic. Click here for more details.
- package/README.md +14 -14
- package/dist/index.js +260 -147
- package/dist/index.js.map +1 -1
- package/dist-esm/src/client/identityClient.js.map +1 -1
- package/dist-esm/src/credentials/authorityValidationOptions.js.map +1 -1
- package/dist-esm/src/credentials/authorizationCodeCredential.js +6 -6
- package/dist-esm/src/credentials/authorizationCodeCredential.js.map +1 -1
- package/dist-esm/src/credentials/azureCliCredential.js +3 -3
- package/dist-esm/src/credentials/azureCliCredential.js.map +1 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js +6 -6
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js.map +1 -1
- package/dist-esm/src/credentials/azurePowerShellCredential.js +3 -3
- package/dist-esm/src/credentials/azurePowerShellCredential.js.map +1 -1
- package/dist-esm/src/credentials/clientAssertionCredential.js +5 -5
- package/dist-esm/src/credentials/clientAssertionCredential.js.map +1 -1
- package/dist-esm/src/credentials/clientCertificateCredential.browser.js +1 -1
- package/dist-esm/src/credentials/clientCertificateCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/clientCertificateCredential.js +5 -5
- package/dist-esm/src/credentials/clientCertificateCredential.js.map +1 -1
- package/dist-esm/src/credentials/clientSecretCredential.browser.js +7 -7
- package/dist-esm/src/credentials/clientSecretCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/clientSecretCredential.js +7 -7
- package/dist-esm/src/credentials/clientSecretCredential.js.map +1 -1
- package/dist-esm/src/credentials/deviceCodeCredential.browser.js +1 -1
- package/dist-esm/src/credentials/deviceCodeCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/deviceCodeCredential.js +6 -6
- package/dist-esm/src/credentials/deviceCodeCredential.js.map +1 -1
- package/dist-esm/src/credentials/deviceCodeCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/environmentCredential.browser.js +1 -1
- package/dist-esm/src/credentials/environmentCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/environmentCredential.js +3 -3
- package/dist-esm/src/credentials/environmentCredential.js.map +1 -1
- package/dist-esm/src/credentials/environmentCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js +8 -8
- package/dist-esm/src/credentials/interactiveBrowserCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/interactiveBrowserCredential.js +8 -8
- package/dist-esm/src/credentials/interactiveBrowserCredential.js.map +1 -1
- package/dist-esm/src/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js +14 -4
- package/dist-esm/src/credentials/managedIdentityCredential/imdsMsi.js.map +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.js +12 -4
- package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.browser.js +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredential.js +4 -4
- package/dist-esm/src/credentials/onBehalfOfCredential.js.map +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/usernamePasswordCredential.browser.js +6 -6
- package/dist-esm/src/credentials/usernamePasswordCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/usernamePasswordCredential.js +6 -6
- package/dist-esm/src/credentials/usernamePasswordCredential.js.map +1 -1
- package/dist-esm/src/credentials/visualStudioCodeCredential.js +2 -2
- package/dist-esm/src/credentials/visualStudioCodeCredential.js.map +1 -1
- package/dist-esm/src/credentials/workloadIdentityCredential.browser.js +2 -2
- package/dist-esm/src/credentials/workloadIdentityCredential.browser.js.map +1 -1
- package/dist-esm/src/credentials/workloadIdentityCredential.js +5 -5
- package/dist-esm/src/credentials/workloadIdentityCredential.js.map +1 -1
- package/dist-esm/src/credentials/workloadIdentityCredentialOptions.js.map +1 -1
- package/dist-esm/src/errors.js.map +1 -1
- package/dist-esm/src/msal/browserFlows/msalAuthCode.js +1 -1
- package/dist-esm/src/msal/browserFlows/msalAuthCode.js.map +1 -1
- package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js +2 -2
- package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js.map +1 -1
- package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js +2 -2
- package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js.map +1 -1
- package/dist-esm/src/msal/nodeFlows/msalOpenBrowser.js +142 -16
- package/dist-esm/src/msal/nodeFlows/msalOpenBrowser.js.map +1 -1
- package/dist-esm/src/msal/utils.js +4 -3
- package/dist-esm/src/msal/utils.js.map +1 -1
- package/dist-esm/src/plugins/provider.js.map +1 -1
- package/dist-esm/src/tokenCredentialOptions.js.map +1 -1
- package/dist-esm/src/util/scopeUtils.js +1 -1
- package/dist-esm/src/util/scopeUtils.js.map +1 -1
- package/dist-esm/src/util/tenantIdUtils.js +3 -3
- package/dist-esm/src/util/tenantIdUtils.js.map +1 -1
- package/package.json +15 -14
- package/types/identity.d.ts +70 -72
- package/dist-esm/src/msal/utils.browser.js +0 -236
- package/dist-esm/src/msal/utils.browser.js.map +0 -1
package/types/identity.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ export declare interface AuthenticationRequiredErrorOptions {
|
|
|
113
113
|
/**
|
|
114
114
|
* Provides options to configure how the Identity library
|
|
115
115
|
* does authority validation during authentication requests
|
|
116
|
-
* to
|
|
116
|
+
* to Azure Active Directory.
|
|
117
117
|
*/
|
|
118
118
|
export declare interface AuthorityValidationOptions {
|
|
119
119
|
/**
|
|
@@ -127,11 +127,11 @@ export declare interface AuthorityValidationOptions {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* Enables authentication to
|
|
130
|
+
* Enables authentication to Azure Active Directory using an authorization code
|
|
131
131
|
* that was obtained through the authorization code flow, described in more detail
|
|
132
|
-
* in the
|
|
132
|
+
* in the Azure Active Directory documentation:
|
|
133
133
|
*
|
|
134
|
-
* https://
|
|
134
|
+
* https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow
|
|
135
135
|
*/
|
|
136
136
|
export declare class AuthorizationCodeCredential implements TokenCredential {
|
|
137
137
|
private msalFlow;
|
|
@@ -143,7 +143,7 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
|
|
|
143
143
|
/**
|
|
144
144
|
* Creates an instance of AuthorizationCodeCredential with the details needed
|
|
145
145
|
* to request an access token using an authentication that was obtained
|
|
146
|
-
* from
|
|
146
|
+
* from Azure Active Directory.
|
|
147
147
|
*
|
|
148
148
|
* It is currently necessary for the user of this credential to initiate
|
|
149
149
|
* the authorization code flow to obtain an authorization code to be used
|
|
@@ -151,7 +151,7 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
|
|
|
151
151
|
*
|
|
152
152
|
* https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/v2/manual/authorizationCodeSample.ts
|
|
153
153
|
*
|
|
154
|
-
* @param tenantId - The
|
|
154
|
+
* @param tenantId - The Azure Active Directory tenant (directory) ID or name.
|
|
155
155
|
* 'common' may be used when dealing with multi-tenant scenarios.
|
|
156
156
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
157
157
|
* @param clientSecret - A client secret that was generated for the App Registration
|
|
@@ -166,7 +166,7 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
|
|
|
166
166
|
/**
|
|
167
167
|
* Creates an instance of AuthorizationCodeCredential with the details needed
|
|
168
168
|
* to request an access token using an authentication that was obtained
|
|
169
|
-
* from
|
|
169
|
+
* from Azure Active Directory.
|
|
170
170
|
*
|
|
171
171
|
* It is currently necessary for the user of this credential to initiate
|
|
172
172
|
* the authorization code flow to obtain an authorization code to be used
|
|
@@ -174,7 +174,7 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
|
|
|
174
174
|
*
|
|
175
175
|
* https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/v2/manual/authorizationCodeSample.ts
|
|
176
176
|
*
|
|
177
|
-
* @param tenantId - The
|
|
177
|
+
* @param tenantId - The Azure Active Directory tenant (directory) ID or name.
|
|
178
178
|
* 'common' may be used when dealing with multi-tenant scenarios.
|
|
179
179
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
180
180
|
* @param authorizationCode - An authorization code that was received from following the
|
|
@@ -186,7 +186,7 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
|
|
|
186
186
|
*/
|
|
187
187
|
constructor(tenantId: string | "common", clientId: string, authorizationCode: string, redirectUri: string, options?: AuthorizationCodeCredentialOptions);
|
|
188
188
|
/**
|
|
189
|
-
* Authenticates with
|
|
189
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
190
190
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
191
191
|
*
|
|
192
192
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -244,7 +244,7 @@ export declare class AzureCliCredential implements TokenCredential {
|
|
|
244
244
|
*/
|
|
245
245
|
constructor(options?: AzureCliCredentialOptions);
|
|
246
246
|
/**
|
|
247
|
-
* Authenticates with
|
|
247
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
248
248
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
249
249
|
*
|
|
250
250
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -272,11 +272,11 @@ export declare interface AzureCliCredentialOptions extends MultiTenantTokenCrede
|
|
|
272
272
|
* Azure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy
|
|
273
273
|
* resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific
|
|
274
274
|
* to Azure developers. It allows users to authenticate as a user and/or a service principal against
|
|
275
|
-
* <a href="https://learn.microsoft.com/azure/active-directory/fundamentals/">
|
|
276
|
-
* AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of
|
|
275
|
+
* <a href="https://learn.microsoft.com/azure/active-directory/fundamentals/">Azure Active Directory (Azure AD)
|
|
276
|
+
* </a>. The AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of
|
|
277
277
|
* the logged-in user or service principal in the Azure Developer CLI. It acts as the Azure Developer CLI logged in user or
|
|
278
278
|
* service principal and executes an Azure CLI command underneath to authenticate the application against
|
|
279
|
-
*
|
|
279
|
+
* Azure Active Directory.
|
|
280
280
|
*
|
|
281
281
|
* <h2> Configure AzureDeveloperCliCredential </h2>
|
|
282
282
|
*
|
|
@@ -307,7 +307,7 @@ export declare class AzureDeveloperCliCredential implements TokenCredential {
|
|
|
307
307
|
*/
|
|
308
308
|
constructor(options?: AzureDeveloperCliCredentialOptions);
|
|
309
309
|
/**
|
|
310
|
-
* Authenticates with
|
|
310
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
311
311
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
312
312
|
*
|
|
313
313
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -358,7 +358,7 @@ export declare class AzurePowerShellCredential implements TokenCredential {
|
|
|
358
358
|
*/
|
|
359
359
|
private getAzurePowerShellAccessToken;
|
|
360
360
|
/**
|
|
361
|
-
* Authenticates with
|
|
361
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
362
362
|
* If the authentication cannot be performed through PowerShell, a {@link CredentialUnavailableError} will be thrown.
|
|
363
363
|
*
|
|
364
364
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -439,17 +439,17 @@ export declare class ClientAssertionCredential implements TokenCredential {
|
|
|
439
439
|
private options;
|
|
440
440
|
/**
|
|
441
441
|
* Creates an instance of the ClientAssertionCredential with the details
|
|
442
|
-
* needed to authenticate against
|
|
442
|
+
* needed to authenticate against Azure Active Directory with a client
|
|
443
443
|
* assertion provided by the developer through the `getAssertion` function parameter.
|
|
444
444
|
*
|
|
445
|
-
* @param tenantId - The
|
|
445
|
+
* @param tenantId - The Azure Active Directory tenant (directory) ID.
|
|
446
446
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
447
447
|
* @param getAssertion - A function that retrieves the assertion for the credential to use.
|
|
448
448
|
* @param options - Options for configuring the client which makes the authentication request.
|
|
449
449
|
*/
|
|
450
450
|
constructor(tenantId: string, clientId: string, getAssertion: () => Promise<string>, options?: ClientAssertionCredentialOptions);
|
|
451
451
|
/**
|
|
452
|
-
* Authenticates with
|
|
452
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
453
453
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
454
454
|
*
|
|
455
455
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -466,11 +466,11 @@ export declare interface ClientAssertionCredentialOptions extends MultiTenantTok
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
/**
|
|
469
|
-
* Enables authentication to
|
|
469
|
+
* Enables authentication to Azure Active Directory using a PEM-encoded
|
|
470
470
|
* certificate that is assigned to an App Registration. More information
|
|
471
471
|
* on how to configure certificate authentication can be found here:
|
|
472
472
|
*
|
|
473
|
-
* https://
|
|
473
|
+
* https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-certificate-credentials#register-your-certificate-with-azure-ad
|
|
474
474
|
*
|
|
475
475
|
*/
|
|
476
476
|
export declare class ClientCertificateCredential implements TokenCredential {
|
|
@@ -479,9 +479,9 @@ export declare class ClientCertificateCredential implements TokenCredential {
|
|
|
479
479
|
private msalFlow;
|
|
480
480
|
/**
|
|
481
481
|
* Creates an instance of the ClientCertificateCredential with the details
|
|
482
|
-
* needed to authenticate against
|
|
482
|
+
* needed to authenticate against Azure Active Directory with a certificate.
|
|
483
483
|
*
|
|
484
|
-
* @param tenantId - The
|
|
484
|
+
* @param tenantId - The Azure Active Directory tenant (directory) ID.
|
|
485
485
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
486
486
|
* @param certificatePath - The path to a PEM-encoded public/private key certificate on the filesystem.
|
|
487
487
|
* @param options - Options for configuring the client which makes the authentication request.
|
|
@@ -489,9 +489,9 @@ export declare class ClientCertificateCredential implements TokenCredential {
|
|
|
489
489
|
constructor(tenantId: string, clientId: string, certificatePath: string, options?: ClientCertificateCredentialOptions);
|
|
490
490
|
/**
|
|
491
491
|
* Creates an instance of the ClientCertificateCredential with the details
|
|
492
|
-
* needed to authenticate against
|
|
492
|
+
* needed to authenticate against Azure Active Directory with a certificate.
|
|
493
493
|
*
|
|
494
|
-
* @param tenantId - The
|
|
494
|
+
* @param tenantId - The Azure Active Directory tenant (directory) ID.
|
|
495
495
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
496
496
|
* @param configuration - Other parameters required, including the path of the certificate on the filesystem.
|
|
497
497
|
* If the type is ignored, we will throw the value of the path to a PEM certificate.
|
|
@@ -500,9 +500,9 @@ export declare class ClientCertificateCredential implements TokenCredential {
|
|
|
500
500
|
constructor(tenantId: string, clientId: string, configuration: ClientCertificatePEMCertificatePath, options?: ClientCertificateCredentialOptions);
|
|
501
501
|
/**
|
|
502
502
|
* Creates an instance of the ClientCertificateCredential with the details
|
|
503
|
-
* needed to authenticate against
|
|
503
|
+
* needed to authenticate against Azure Active Directory with a certificate.
|
|
504
504
|
*
|
|
505
|
-
* @param tenantId - The
|
|
505
|
+
* @param tenantId - The Azure Active Directory tenant (directory) ID.
|
|
506
506
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
507
507
|
* @param configuration - Other parameters required, including the PEM-encoded certificate as a string.
|
|
508
508
|
* If the type is ignored, we will throw the value of the PEM-encoded certificate.
|
|
@@ -510,7 +510,7 @@ export declare class ClientCertificateCredential implements TokenCredential {
|
|
|
510
510
|
*/
|
|
511
511
|
constructor(tenantId: string, clientId: string, configuration: ClientCertificatePEMCertificate, options?: ClientCertificateCredentialOptions);
|
|
512
512
|
/**
|
|
513
|
-
* Authenticates with
|
|
513
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
514
514
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
515
515
|
*
|
|
516
516
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -565,11 +565,11 @@ export declare interface ClientCertificatePEMCertificatePath {
|
|
|
565
565
|
}
|
|
566
566
|
|
|
567
567
|
/**
|
|
568
|
-
* Enables authentication to
|
|
568
|
+
* Enables authentication to Azure Active Directory using a client secret
|
|
569
569
|
* that was generated for an App Registration. More information on how
|
|
570
570
|
* to configure a client secret can be found here:
|
|
571
571
|
*
|
|
572
|
-
* https://
|
|
572
|
+
* https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application
|
|
573
573
|
*
|
|
574
574
|
*/
|
|
575
575
|
export declare class ClientSecretCredential implements TokenCredential {
|
|
@@ -578,17 +578,17 @@ export declare class ClientSecretCredential implements TokenCredential {
|
|
|
578
578
|
private msalFlow;
|
|
579
579
|
/**
|
|
580
580
|
* Creates an instance of the ClientSecretCredential with the details
|
|
581
|
-
* needed to authenticate against
|
|
581
|
+
* needed to authenticate against Azure Active Directory with a client
|
|
582
582
|
* secret.
|
|
583
583
|
*
|
|
584
|
-
* @param tenantId - The
|
|
584
|
+
* @param tenantId - The Azure Active Directory tenant (directory) ID.
|
|
585
585
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
586
586
|
* @param clientSecret - A client secret that was generated for the App Registration.
|
|
587
587
|
* @param options - Options for configuring the client which makes the authentication request.
|
|
588
588
|
*/
|
|
589
589
|
constructor(tenantId: string, clientId: string, clientSecret: string, options?: ClientSecretCredentialOptions);
|
|
590
590
|
/**
|
|
591
|
-
* Authenticates with
|
|
591
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
592
592
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
593
593
|
*
|
|
594
594
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -796,7 +796,7 @@ export declare interface DefaultAzureCredentialResourceIdOptions extends Default
|
|
|
796
796
|
export declare function deserializeAuthenticationRecord(serializedRecord: string): AuthenticationRecord;
|
|
797
797
|
|
|
798
798
|
/**
|
|
799
|
-
* Enables authentication to
|
|
799
|
+
* Enables authentication to Azure Active Directory using a device code
|
|
800
800
|
* that the user can enter into https://microsoft.com/devicelogin.
|
|
801
801
|
*/
|
|
802
802
|
export declare class DeviceCodeCredential implements TokenCredential {
|
|
@@ -806,7 +806,7 @@ export declare class DeviceCodeCredential implements TokenCredential {
|
|
|
806
806
|
private disableAutomaticAuthentication?;
|
|
807
807
|
/**
|
|
808
808
|
* Creates an instance of DeviceCodeCredential with the details needed
|
|
809
|
-
* to initiate the device code authorization flow with
|
|
809
|
+
* to initiate the device code authorization flow with Azure Active Directory.
|
|
810
810
|
*
|
|
811
811
|
* A message will be logged, giving users a code that they can use to authenticate once they go to https://microsoft.com/devicelogin
|
|
812
812
|
*
|
|
@@ -826,7 +826,7 @@ export declare class DeviceCodeCredential implements TokenCredential {
|
|
|
826
826
|
*/
|
|
827
827
|
constructor(options?: DeviceCodeCredentialOptions);
|
|
828
828
|
/**
|
|
829
|
-
* Authenticates with
|
|
829
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
830
830
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
831
831
|
*
|
|
832
832
|
* If the user provided the option `disableAutomaticAuthentication`,
|
|
@@ -839,7 +839,7 @@ export declare class DeviceCodeCredential implements TokenCredential {
|
|
|
839
839
|
*/
|
|
840
840
|
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
|
|
841
841
|
/**
|
|
842
|
-
* Authenticates with
|
|
842
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
843
843
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
844
844
|
*
|
|
845
845
|
* If the token can't be retrieved silently, this method will require user interaction to retrieve the token.
|
|
@@ -856,7 +856,7 @@ export declare class DeviceCodeCredential implements TokenCredential {
|
|
|
856
856
|
*/
|
|
857
857
|
export declare interface DeviceCodeCredentialOptions extends InteractiveCredentialOptions, CredentialPersistenceOptions {
|
|
858
858
|
/**
|
|
859
|
-
* The
|
|
859
|
+
* The Azure Active Directory tenant (directory) ID.
|
|
860
860
|
*/
|
|
861
861
|
tenantId?: string;
|
|
862
862
|
/**
|
|
@@ -901,7 +901,7 @@ export declare interface DeviceCodeInfo {
|
|
|
901
901
|
export declare type DeviceCodePromptCallback = (deviceCodeInfo: DeviceCodeInfo) => void;
|
|
902
902
|
|
|
903
903
|
/**
|
|
904
|
-
* Enables authentication to
|
|
904
|
+
* Enables authentication to Azure Active Directory using a client secret or certificate, or as a user
|
|
905
905
|
* with a username and password.
|
|
906
906
|
*/
|
|
907
907
|
export declare class EnvironmentCredential implements TokenCredential {
|
|
@@ -910,7 +910,7 @@ export declare class EnvironmentCredential implements TokenCredential {
|
|
|
910
910
|
* Creates an instance of the EnvironmentCredential class and decides what credential to use depending on the available environment variables.
|
|
911
911
|
*
|
|
912
912
|
* Required environment variables:
|
|
913
|
-
* - `AZURE_TENANT_ID`: The
|
|
913
|
+
* - `AZURE_TENANT_ID`: The Azure Active Directory tenant (directory) ID.
|
|
914
914
|
* - `AZURE_CLIENT_ID`: The client (application) ID of an App Registration in the tenant.
|
|
915
915
|
*
|
|
916
916
|
* If setting the AZURE_TENANT_ID, then you can also set the additionally allowed tenants
|
|
@@ -932,7 +932,7 @@ export declare class EnvironmentCredential implements TokenCredential {
|
|
|
932
932
|
*/
|
|
933
933
|
constructor(options?: EnvironmentCredentialOptions);
|
|
934
934
|
/**
|
|
935
|
-
* Authenticates with
|
|
935
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
936
936
|
*
|
|
937
937
|
* @param scopes - The list of scopes for which the token will have access.
|
|
938
938
|
* @param options - Optional parameters. See {@link GetTokenOptions}.
|
|
@@ -941,7 +941,7 @@ export declare class EnvironmentCredential implements TokenCredential {
|
|
|
941
941
|
}
|
|
942
942
|
|
|
943
943
|
/**
|
|
944
|
-
* Enables authentication to
|
|
944
|
+
* Enables authentication to Azure Active Directory depending on the available environment variables.
|
|
945
945
|
* Defines options for the EnvironmentCredential class.
|
|
946
946
|
*/
|
|
947
947
|
export declare interface EnvironmentCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
|
@@ -950,7 +950,7 @@ export declare interface EnvironmentCredentialOptions extends MultiTenantTokenCr
|
|
|
950
950
|
/**
|
|
951
951
|
* See the official documentation for more details:
|
|
952
952
|
*
|
|
953
|
-
* https://
|
|
953
|
+
* https://learn.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code#error-response-1
|
|
954
954
|
*
|
|
955
955
|
* NOTE: This documentation is for v1 OAuth support but the same error
|
|
956
956
|
* response details still apply to v2.
|
|
@@ -996,7 +996,7 @@ export { GetTokenOptions }
|
|
|
996
996
|
export declare type IdentityPlugin = (context: unknown) => void;
|
|
997
997
|
|
|
998
998
|
/**
|
|
999
|
-
* Enables authentication to
|
|
999
|
+
* Enables authentication to Azure Active Directory inside of the web browser
|
|
1000
1000
|
* using the interactive login flow.
|
|
1001
1001
|
*/
|
|
1002
1002
|
export declare class InteractiveBrowserCredential implements TokenCredential {
|
|
@@ -1007,18 +1007,18 @@ export declare class InteractiveBrowserCredential implements TokenCredential {
|
|
|
1007
1007
|
/**
|
|
1008
1008
|
* Creates an instance of InteractiveBrowserCredential with the details needed.
|
|
1009
1009
|
*
|
|
1010
|
-
* This credential uses the [Authorization Code Flow](https://
|
|
1010
|
+
* This credential uses the [Authorization Code Flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow).
|
|
1011
1011
|
* On Node.js, it will open a browser window while it listens for a redirect response from the authentication service.
|
|
1012
1012
|
* On browsers, it authenticates via popups. The `loginStyle` optional parameter can be set to `redirect` to authenticate by redirecting the user to an Azure secure login page, which then will redirect the user back to the web application where the authentication started.
|
|
1013
1013
|
*
|
|
1014
|
-
* For Node.js, if a `clientId` is provided, the
|
|
1015
|
-
* Follow our guide on [setting up Redirect URIs for Desktop apps that calls to web APIs](https://
|
|
1014
|
+
* For Node.js, if a `clientId` is provided, the Azure Active Directory application will need to be configured to have a "Mobile and desktop applications" redirect endpoint.
|
|
1015
|
+
* Follow our guide on [setting up Redirect URIs for Desktop apps that calls to web APIs](https://docs.microsoft.com/azure/active-directory/develop/scenario-desktop-app-registration#redirect-uris).
|
|
1016
1016
|
*
|
|
1017
1017
|
* @param options - Options for configuring the client which makes the authentication requests.
|
|
1018
1018
|
*/
|
|
1019
1019
|
constructor(options?: InteractiveBrowserCredentialNodeOptions | InteractiveBrowserCredentialInBrowserOptions);
|
|
1020
1020
|
/**
|
|
1021
|
-
* Authenticates with
|
|
1021
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
1022
1022
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
1023
1023
|
*
|
|
1024
1024
|
* If the user provided the option `disableAutomaticAuthentication`,
|
|
@@ -1031,7 +1031,7 @@ export declare class InteractiveBrowserCredential implements TokenCredential {
|
|
|
1031
1031
|
*/
|
|
1032
1032
|
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>;
|
|
1033
1033
|
/**
|
|
1034
|
-
* Authenticates with
|
|
1034
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
1035
1035
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
1036
1036
|
*
|
|
1037
1037
|
* If the token can't be retrieved silently, this method will require user interaction to retrieve the token.
|
|
@@ -1053,11 +1053,10 @@ export declare interface InteractiveBrowserCredentialInBrowserOptions extends In
|
|
|
1053
1053
|
/**
|
|
1054
1054
|
* Gets the redirect URI of the application. This should be same as the value
|
|
1055
1055
|
* in the application registration portal. Defaults to `window.location.href`.
|
|
1056
|
-
* This field is no longer required for Node.js.
|
|
1057
1056
|
*/
|
|
1058
1057
|
redirectUri?: string | (() => string);
|
|
1059
1058
|
/**
|
|
1060
|
-
* The
|
|
1059
|
+
* The Azure Active Directory tenant (directory) ID.
|
|
1061
1060
|
*/
|
|
1062
1061
|
tenantId?: string;
|
|
1063
1062
|
/**
|
|
@@ -1086,11 +1085,10 @@ export declare interface InteractiveBrowserCredentialNodeOptions extends Interac
|
|
|
1086
1085
|
/**
|
|
1087
1086
|
* Gets the redirect URI of the application. This should be same as the value
|
|
1088
1087
|
* in the application registration portal. Defaults to `window.location.href`.
|
|
1089
|
-
* This field is no longer required for Node.js.
|
|
1090
1088
|
*/
|
|
1091
1089
|
redirectUri?: string | (() => string);
|
|
1092
1090
|
/**
|
|
1093
|
-
* The
|
|
1091
|
+
* The Azure Active Directory tenant (directory) ID.
|
|
1094
1092
|
*/
|
|
1095
1093
|
tenantId?: string;
|
|
1096
1094
|
/**
|
|
@@ -1137,7 +1135,7 @@ export declare const logger: AzureLogger;
|
|
|
1137
1135
|
* Azure Kubernetes Services, Azure Service Fabric instances and inside of the Azure Cloud Shell.
|
|
1138
1136
|
*
|
|
1139
1137
|
* More information about configuring managed identities can be found here:
|
|
1140
|
-
* https://
|
|
1138
|
+
* https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview
|
|
1141
1139
|
*/
|
|
1142
1140
|
export declare class ManagedIdentityCredential implements TokenCredential {
|
|
1143
1141
|
private identityClient;
|
|
@@ -1171,7 +1169,7 @@ export declare class ManagedIdentityCredential implements TokenCredential {
|
|
|
1171
1169
|
private cachedAvailableMSI;
|
|
1172
1170
|
private authenticateManagedIdentity;
|
|
1173
1171
|
/**
|
|
1174
|
-
* Authenticates with
|
|
1172
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
1175
1173
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
1176
1174
|
* If an unexpected error occurs, an {@link AuthenticationError} will be thrown with the details of the failure.
|
|
1177
1175
|
*
|
|
@@ -1228,7 +1226,7 @@ export declare interface MultiTenantTokenCredentialOptions extends TokenCredenti
|
|
|
1228
1226
|
}
|
|
1229
1227
|
|
|
1230
1228
|
/**
|
|
1231
|
-
* Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://
|
|
1229
|
+
* Enables authentication to Microsoft Entra ID using the [On Behalf Of flow](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow).
|
|
1232
1230
|
*/
|
|
1233
1231
|
export declare class OnBehalfOfCredential implements TokenCredential {
|
|
1234
1232
|
private options;
|
|
@@ -1237,7 +1235,7 @@ export declare class OnBehalfOfCredential implements TokenCredential {
|
|
|
1237
1235
|
private msalFlow;
|
|
1238
1236
|
/**
|
|
1239
1237
|
* Creates an instance of the {@link OnBehalfOfCredential} with the details
|
|
1240
|
-
* needed to authenticate against
|
|
1238
|
+
* needed to authenticate against Azure Active Directory with path to a PEM certificate,
|
|
1241
1239
|
* and an user assertion.
|
|
1242
1240
|
*
|
|
1243
1241
|
* Example using the `KeyClient` from [\@azure/keyvault-keys](https://www.npmjs.com/package/\@azure/keyvault-keys):
|
|
@@ -1259,7 +1257,7 @@ export declare class OnBehalfOfCredential implements TokenCredential {
|
|
|
1259
1257
|
constructor(options: OnBehalfOfCredentialCertificateOptions & MultiTenantTokenCredentialOptions & CredentialPersistenceOptions);
|
|
1260
1258
|
/**
|
|
1261
1259
|
* Creates an instance of the {@link OnBehalfOfCredential} with the details
|
|
1262
|
-
* needed to authenticate against
|
|
1260
|
+
* needed to authenticate against Azure Active Directory with a client
|
|
1263
1261
|
* secret and an user assertion.
|
|
1264
1262
|
*
|
|
1265
1263
|
* Example using the `KeyClient` from [\@azure/keyvault-keys](https://www.npmjs.com/package/\@azure/keyvault-keys):
|
|
@@ -1280,7 +1278,7 @@ export declare class OnBehalfOfCredential implements TokenCredential {
|
|
|
1280
1278
|
*/
|
|
1281
1279
|
constructor(options: OnBehalfOfCredentialSecretOptions & MultiTenantTokenCredentialOptions & CredentialPersistenceOptions);
|
|
1282
1280
|
/**
|
|
1283
|
-
* Authenticates with
|
|
1281
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
1284
1282
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
1285
1283
|
*
|
|
1286
1284
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -1294,7 +1292,7 @@ export declare class OnBehalfOfCredential implements TokenCredential {
|
|
|
1294
1292
|
*/
|
|
1295
1293
|
export declare interface OnBehalfOfCredentialCertificateOptions {
|
|
1296
1294
|
/**
|
|
1297
|
-
* The
|
|
1295
|
+
* The Azure Active Directory tenant (directory) ID.
|
|
1298
1296
|
*/
|
|
1299
1297
|
tenantId: string;
|
|
1300
1298
|
/**
|
|
@@ -1326,7 +1324,7 @@ export declare type OnBehalfOfCredentialOptions = (OnBehalfOfCredentialSecretOpt
|
|
|
1326
1324
|
*/
|
|
1327
1325
|
export declare interface OnBehalfOfCredentialSecretOptions {
|
|
1328
1326
|
/**
|
|
1329
|
-
* The
|
|
1327
|
+
* The Azure Active Directory tenant (directory) ID.
|
|
1330
1328
|
*/
|
|
1331
1329
|
tenantId: string;
|
|
1332
1330
|
/**
|
|
@@ -1387,7 +1385,7 @@ export { TokenCredential }
|
|
|
1387
1385
|
|
|
1388
1386
|
/**
|
|
1389
1387
|
* Provides options to configure how the Identity library makes authentication
|
|
1390
|
-
* requests to
|
|
1388
|
+
* requests to Azure Active Directory.
|
|
1391
1389
|
*/
|
|
1392
1390
|
export declare interface TokenCredentialOptions extends CommonClientOptions {
|
|
1393
1391
|
/**
|
|
@@ -1441,7 +1439,7 @@ export declare interface TokenCredentialOptions extends CommonClientOptions {
|
|
|
1441
1439
|
export declare function useIdentityPlugin(plugin: IdentityPlugin): void;
|
|
1442
1440
|
|
|
1443
1441
|
/**
|
|
1444
|
-
* Enables authentication to
|
|
1442
|
+
* Enables authentication to Azure Active Directory with a user's
|
|
1445
1443
|
* username and password. This credential requires a high degree of
|
|
1446
1444
|
* trust so you should only use it when other, more secure credential
|
|
1447
1445
|
* types can't be used.
|
|
@@ -1452,10 +1450,10 @@ export declare class UsernamePasswordCredential implements TokenCredential {
|
|
|
1452
1450
|
private msalFlow;
|
|
1453
1451
|
/**
|
|
1454
1452
|
* Creates an instance of the UsernamePasswordCredential with the details
|
|
1455
|
-
* needed to authenticate against
|
|
1453
|
+
* needed to authenticate against Azure Active Directory with a username
|
|
1456
1454
|
* and password.
|
|
1457
1455
|
*
|
|
1458
|
-
* @param tenantId - The
|
|
1456
|
+
* @param tenantId - The Azure Active Directory tenant (directory).
|
|
1459
1457
|
* @param clientId - The client (application) ID of an App Registration in the tenant.
|
|
1460
1458
|
* @param username - The user account's e-mail address (user name).
|
|
1461
1459
|
* @param password - The user account's account password
|
|
@@ -1463,7 +1461,7 @@ export declare class UsernamePasswordCredential implements TokenCredential {
|
|
|
1463
1461
|
*/
|
|
1464
1462
|
constructor(tenantId: string, clientId: string, username: string, password: string, options?: UsernamePasswordCredentialOptions);
|
|
1465
1463
|
/**
|
|
1466
|
-
* Authenticates with
|
|
1464
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
1467
1465
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
1468
1466
|
*
|
|
1469
1467
|
* If the user provided the option `disableAutomaticAuthentication`,
|
|
@@ -1551,10 +1549,10 @@ export declare interface VisualStudioCodeCredentialOptions extends MultiTenantTo
|
|
|
1551
1549
|
* Identity authentication, you can avoid the need to manage and rotate service principals or managed identities for
|
|
1552
1550
|
* each application on each VM. Additionally, because SACs are created automatically and managed by Azure, you don't
|
|
1553
1551
|
* need to worry about storing and securing sensitive credentials themselves.
|
|
1554
|
-
* The WorkloadIdentityCredential supports
|
|
1552
|
+
* The WorkloadIdentityCredential supports Azure workload identity authentication on Azure Kubernetes and acquires
|
|
1555
1553
|
* a token using the SACs available in the Azure Kubernetes environment.
|
|
1556
|
-
* Refer to <a href="https://learn.microsoft.com/azure/aks/workload-identity-overview">
|
|
1557
|
-
* Workload
|
|
1554
|
+
* Refer to <a href="https://learn.microsoft.com/azure/aks/workload-identity-overview">Azure Active Directory
|
|
1555
|
+
* Workload Identity</a> for more information.
|
|
1558
1556
|
*/
|
|
1559
1557
|
export declare class WorkloadIdentityCredential implements TokenCredential {
|
|
1560
1558
|
private client;
|
|
@@ -1562,13 +1560,13 @@ export declare class WorkloadIdentityCredential implements TokenCredential {
|
|
|
1562
1560
|
private cacheDate;
|
|
1563
1561
|
private federatedTokenFilePath;
|
|
1564
1562
|
/**
|
|
1565
|
-
* WorkloadIdentityCredential supports
|
|
1563
|
+
* WorkloadIdentityCredential supports Azure workload identity on Kubernetes.
|
|
1566
1564
|
*
|
|
1567
1565
|
* @param options - The identity client options to use for authentication.
|
|
1568
1566
|
*/
|
|
1569
1567
|
constructor(options?: WorkloadIdentityCredentialOptions);
|
|
1570
1568
|
/**
|
|
1571
|
-
* Authenticates with
|
|
1569
|
+
* Authenticates with Azure Active Directory and returns an access token if successful.
|
|
1572
1570
|
* If authentication fails, a {@link CredentialUnavailableError} will be thrown with the details of the failure.
|
|
1573
1571
|
*
|
|
1574
1572
|
* @param scopes - The list of scopes for which the token will have access.
|
|
@@ -1584,11 +1582,11 @@ export declare class WorkloadIdentityCredential implements TokenCredential {
|
|
|
1584
1582
|
*/
|
|
1585
1583
|
export declare interface WorkloadIdentityCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
|
1586
1584
|
/**
|
|
1587
|
-
* ID of the application's
|
|
1585
|
+
* ID of the application's Azure Active Directory tenant. Also called its directory ID.
|
|
1588
1586
|
*/
|
|
1589
1587
|
tenantId?: string;
|
|
1590
1588
|
/**
|
|
1591
|
-
* The client ID of
|
|
1589
|
+
* The client ID of an Azure AD app registration.
|
|
1592
1590
|
*/
|
|
1593
1591
|
clientId?: string;
|
|
1594
1592
|
/**
|