@azure/identity 3.1.3 → 3.2.0-alpha.20230213.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 +10 -1
- package/dist/index.js +238 -113
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/credentials/authorityValidationOptions.js +4 -0
- package/dist-esm/src/credentials/authorityValidationOptions.js.map +1 -0
- package/dist-esm/src/credentials/authorizationCodeCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/azureApplicationCredential.js +0 -2
- package/dist-esm/src/credentials/azureApplicationCredential.js.map +1 -1
- package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js +23 -0
- package/dist-esm/src/credentials/azureDeveloperCliCredential.browser.js.map +1 -0
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js +136 -0
- package/dist-esm/src/credentials/azureDeveloperCliCredential.js.map +1 -0
- package/dist-esm/src/credentials/azureDeveloperCliCredentialOptions.js +4 -0
- package/dist-esm/src/credentials/azureDeveloperCliCredentialOptions.js.map +1 -0
- package/dist-esm/src/credentials/chainedTokenCredential.js +0 -4
- package/dist-esm/src/credentials/chainedTokenCredential.js.map +1 -1
- package/dist-esm/src/credentials/clientAssertionCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/clientCertificateCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/clientSecretCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/defaultAzureCredential.js +2 -2
- package/dist-esm/src/credentials/defaultAzureCredential.js.map +1 -1
- package/dist-esm/src/credentials/defaultAzureCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/environmentCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/interactiveBrowserCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/interactiveCredentialOptions.js.map +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.js +1 -1
- package/dist-esm/src/credentials/managedIdentityCredential/index.js.map +1 -1
- package/dist-esm/src/credentials/onBehalfOfCredentialOptions.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js +1 -1
- package/dist-esm/src/msal/browserFlows/msalBrowserCommon.js.map +1 -1
- package/dist-esm/src/msal/flows.js.map +1 -1
- package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js +1 -1
- package/dist-esm/src/msal/nodeFlows/msalNodeCommon.js.map +1 -1
- package/dist-esm/src/msal/utils.js +2 -2
- package/dist-esm/src/msal/utils.js.map +1 -1
- package/package.json +8 -8
- package/types/identity.d.ts +24 -13
package/types/identity.d.ts
CHANGED
|
@@ -110,6 +110,18 @@ export declare interface AuthenticationRequiredErrorOptions {
|
|
|
110
110
|
message?: string;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Provides options to configure how the Identity library
|
|
115
|
+
* does authority validation during authentication requests
|
|
116
|
+
* to Azure Active Directory.
|
|
117
|
+
*/
|
|
118
|
+
export declare interface AuthorityValidationOptions {
|
|
119
|
+
/**
|
|
120
|
+
* Setting this flag to `true` disables both authority validation and instance discovery.
|
|
121
|
+
*/
|
|
122
|
+
disableInstanceDiscovery?: boolean;
|
|
123
|
+
}
|
|
124
|
+
|
|
113
125
|
/**
|
|
114
126
|
* Enables authentication to Azure Active Directory using an authorization code
|
|
115
127
|
* that was obtained through the authorization code flow, described in more detail
|
|
@@ -183,7 +195,7 @@ export declare class AuthorizationCodeCredential implements TokenCredential {
|
|
|
183
195
|
/**
|
|
184
196
|
* Options for the {@link AuthorizationCodeCredential}
|
|
185
197
|
*/
|
|
186
|
-
export declare interface AuthorizationCodeCredentialOptions extends MultiTenantTokenCredentialOptions {
|
|
198
|
+
export declare interface AuthorizationCodeCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
|
187
199
|
}
|
|
188
200
|
|
|
189
201
|
/**
|
|
@@ -308,10 +320,6 @@ export declare type BrowserLoginStyle = "redirect" | "popup";
|
|
|
308
320
|
* until one of the getToken methods returns an access token.
|
|
309
321
|
*/
|
|
310
322
|
export declare class ChainedTokenCredential implements TokenCredential {
|
|
311
|
-
/**
|
|
312
|
-
* The message to use when the chained token fails to get a token
|
|
313
|
-
*/
|
|
314
|
-
protected UnavailableMessage: string;
|
|
315
323
|
private _sources;
|
|
316
324
|
/**
|
|
317
325
|
* Creates an instance of ChainedTokenCredential using the given credentials.
|
|
@@ -376,7 +384,7 @@ export declare class ClientAssertionCredential implements TokenCredential {
|
|
|
376
384
|
/**
|
|
377
385
|
* Options for the {@link ClientAssertionCredential}
|
|
378
386
|
*/
|
|
379
|
-
export declare interface ClientAssertionCredentialOptions extends MultiTenantTokenCredentialOptions {
|
|
387
|
+
export declare interface ClientAssertionCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
|
380
388
|
}
|
|
381
389
|
|
|
382
390
|
/**
|
|
@@ -437,7 +445,7 @@ export declare class ClientCertificateCredential implements TokenCredential {
|
|
|
437
445
|
/**
|
|
438
446
|
* Optional parameters for the {@link ClientCertificateCredential} class.
|
|
439
447
|
*/
|
|
440
|
-
export declare interface ClientCertificateCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions {
|
|
448
|
+
export declare interface ClientCertificateCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions, AuthorityValidationOptions {
|
|
441
449
|
/**
|
|
442
450
|
* Option to include x5c header for SubjectName and Issuer name authorization.
|
|
443
451
|
* Set this option to send base64 encoded public certificate in the client assertion header as an x5c claim
|
|
@@ -515,7 +523,7 @@ export declare class ClientSecretCredential implements TokenCredential {
|
|
|
515
523
|
/**
|
|
516
524
|
* Optional parameters for the {@link ClientSecretCredential} class.
|
|
517
525
|
*/
|
|
518
|
-
export declare interface ClientSecretCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions {
|
|
526
|
+
export declare interface ClientSecretCredentialOptions extends MultiTenantTokenCredentialOptions, CredentialPersistenceOptions, AuthorityValidationOptions {
|
|
519
527
|
}
|
|
520
528
|
|
|
521
529
|
/**
|
|
@@ -584,6 +592,7 @@ export declare class DefaultAzureCredential extends ChainedTokenCredential {
|
|
|
584
592
|
*
|
|
585
593
|
* - {@link EnvironmentCredential}
|
|
586
594
|
* - {@link ManagedIdentityCredential}
|
|
595
|
+
* - {@link AzureDeveloperCliCredential}
|
|
587
596
|
* - {@link AzureCliCredential}
|
|
588
597
|
* - {@link AzurePowerShellCredential}
|
|
589
598
|
*
|
|
@@ -603,6 +612,7 @@ export declare class DefaultAzureCredential extends ChainedTokenCredential {
|
|
|
603
612
|
*
|
|
604
613
|
* - {@link EnvironmentCredential}
|
|
605
614
|
* - {@link ManagedIdentityCredential}
|
|
615
|
+
* - {@link AzureDeveloperCliCredential}
|
|
606
616
|
* - {@link AzureCliCredential}
|
|
607
617
|
* - {@link AzurePowerShellCredential}
|
|
608
618
|
*
|
|
@@ -622,6 +632,7 @@ export declare class DefaultAzureCredential extends ChainedTokenCredential {
|
|
|
622
632
|
*
|
|
623
633
|
* - {@link EnvironmentCredential}
|
|
624
634
|
* - {@link ManagedIdentityCredential}
|
|
635
|
+
* - {@link AzureDeveloperCliCredential}
|
|
625
636
|
* - {@link AzureCliCredential}
|
|
626
637
|
* - {@link AzurePowerShellCredential}
|
|
627
638
|
*
|
|
@@ -648,7 +659,7 @@ export declare interface DefaultAzureCredentialClientIdOptions extends DefaultAz
|
|
|
648
659
|
/**
|
|
649
660
|
* Provides options to configure the {@link DefaultAzureCredential} class.
|
|
650
661
|
*/
|
|
651
|
-
export declare interface DefaultAzureCredentialOptions extends MultiTenantTokenCredentialOptions {
|
|
662
|
+
export declare interface DefaultAzureCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
|
652
663
|
/**
|
|
653
664
|
* Optionally pass in a Tenant ID to be used as part of the credential.
|
|
654
665
|
* By default it may use a generic tenant ID depending on the underlying credential.
|
|
@@ -841,7 +852,7 @@ export declare class EnvironmentCredential implements TokenCredential {
|
|
|
841
852
|
* Enables authentication to Azure Active Directory depending on the available environment variables.
|
|
842
853
|
* Defines options for the EnvironmentCredential class.
|
|
843
854
|
*/
|
|
844
|
-
export declare interface EnvironmentCredentialOptions extends MultiTenantTokenCredentialOptions {
|
|
855
|
+
export declare interface EnvironmentCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
|
845
856
|
}
|
|
846
857
|
|
|
847
858
|
/**
|
|
@@ -978,7 +989,7 @@ export declare interface InteractiveBrowserCredentialInBrowserOptions extends In
|
|
|
978
989
|
/**
|
|
979
990
|
* Defines the common options for the InteractiveBrowserCredential class.
|
|
980
991
|
*/
|
|
981
|
-
export declare interface InteractiveBrowserCredentialNodeOptions extends InteractiveCredentialOptions, CredentialPersistenceOptions {
|
|
992
|
+
export declare interface InteractiveBrowserCredentialNodeOptions extends InteractiveCredentialOptions, CredentialPersistenceOptions, AuthorityValidationOptions {
|
|
982
993
|
/**
|
|
983
994
|
* Gets the redirect URI of the application. This should be same as the value
|
|
984
995
|
* in the application registration portal. Defaults to `window.location.href`.
|
|
@@ -1002,7 +1013,7 @@ export declare interface InteractiveBrowserCredentialNodeOptions extends Interac
|
|
|
1002
1013
|
/**
|
|
1003
1014
|
* Common constructor options for the Identity credentials that requires user interaction.
|
|
1004
1015
|
*/
|
|
1005
|
-
export declare interface InteractiveCredentialOptions extends MultiTenantTokenCredentialOptions {
|
|
1016
|
+
export declare interface InteractiveCredentialOptions extends MultiTenantTokenCredentialOptions, AuthorityValidationOptions {
|
|
1006
1017
|
/**
|
|
1007
1018
|
* Result of a previous authentication that can be used to retrieve the cached credentials of each individual account.
|
|
1008
1019
|
* This is necessary to provide in case the application wants to work with more than one account per
|
|
@@ -1212,7 +1223,7 @@ export declare interface OnBehalfOfCredentialCertificateOptions {
|
|
|
1212
1223
|
/**
|
|
1213
1224
|
* Optional parameters for the {@link OnBehalfOfCredential} class.
|
|
1214
1225
|
*/
|
|
1215
|
-
export declare type OnBehalfOfCredentialOptions = (OnBehalfOfCredentialSecretOptions | OnBehalfOfCredentialCertificateOptions) & MultiTenantTokenCredentialOptions & CredentialPersistenceOptions;
|
|
1226
|
+
export declare type OnBehalfOfCredentialOptions = (OnBehalfOfCredentialSecretOptions | OnBehalfOfCredentialCertificateOptions) & MultiTenantTokenCredentialOptions & CredentialPersistenceOptions & AuthorityValidationOptions;
|
|
1216
1227
|
|
|
1217
1228
|
/**
|
|
1218
1229
|
* Defines the parameters to authenticate the {@link OnBehalfOfCredential} with a secret.
|