@azure/msal-common 15.5.0 → 15.5.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.
- package/dist/account/AccountInfo.mjs +1 -1
- package/dist/account/AuthToken.mjs +1 -1
- package/dist/account/CcsCredential.mjs +1 -1
- package/dist/account/ClientInfo.mjs +1 -1
- package/dist/account/TokenClaims.mjs +1 -1
- package/dist/authority/Authority.d.ts +1 -1
- package/dist/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.mjs +1 -1
- package/dist/authority/AuthorityFactory.mjs +1 -1
- package/dist/authority/AuthorityMetadata.mjs +1 -1
- package/dist/authority/AuthorityOptions.mjs +1 -1
- package/dist/authority/AuthorityType.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
- package/dist/authority/OpenIdConfigResponse.mjs +1 -1
- package/dist/authority/ProtocolMode.mjs +1 -1
- package/dist/authority/RegionDiscovery.mjs +1 -1
- package/dist/cache/CacheManager.mjs +1 -1
- package/dist/cache/entities/AccountEntity.d.ts +1 -1
- package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccountEntity.mjs +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/CacheHelpers.mjs +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +2 -2
- package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
- package/dist/client/BaseClient.mjs +1 -1
- package/dist/client/RefreshTokenClient.mjs +1 -1
- package/dist/client/SilentFlowClient.mjs +1 -1
- package/dist/config/ClientConfiguration.d.ts +9 -1
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.mjs +2 -1
- package/dist/config/ClientConfiguration.mjs.map +1 -1
- package/dist/constants/AADServerParamKeys.mjs +1 -1
- package/dist/crypto/ICrypto.d.ts +2 -2
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.mjs +1 -1
- package/dist/crypto/JoseHeader.mjs +1 -1
- package/dist/crypto/PopTokenGenerator.mjs +1 -1
- package/dist/error/AuthError.mjs +1 -1
- package/dist/error/AuthErrorCodes.mjs +1 -1
- package/dist/error/CacheError.mjs +1 -1
- package/dist/error/CacheErrorCodes.mjs +1 -1
- package/dist/error/ClientAuthError.mjs +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +1 -1
- package/dist/error/ClientConfigurationError.mjs +1 -1
- package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
- package/dist/error/JoseHeaderError.mjs +1 -1
- package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
- package/dist/error/NetworkError.d.ts +1 -1
- package/dist/error/NetworkError.d.ts.map +1 -1
- package/dist/error/NetworkError.mjs +3 -2
- package/dist/error/NetworkError.mjs.map +1 -1
- package/dist/error/ServerError.mjs +1 -1
- package/dist/index-browser.mjs +1 -1
- package/dist/index-node.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/logger/Logger.d.ts +1 -1
- package/dist/logger/Logger.d.ts.map +1 -1
- package/dist/logger/Logger.mjs +1 -1
- package/dist/network/INetworkModule.mjs +1 -1
- package/dist/network/RequestThumbprint.mjs +1 -1
- package/dist/network/ThrottlingUtils.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts +2 -1
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +3 -3
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/request/AuthenticationHeaderParser.mjs +1 -1
- package/dist/request/BaseAuthRequest.d.ts +1 -1
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.mjs +1 -1
- package/dist/request/RequestValidator.mjs +1 -1
- package/dist/request/ScopeSet.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
- package/dist/url/UrlString.mjs +1 -1
- package/dist/utils/ClientAssertionUtils.mjs +1 -1
- package/dist/utils/Constants.mjs +1 -1
- package/dist/utils/FunctionWrappers.mjs +1 -1
- package/dist/utils/ProtocolUtils.mjs +1 -1
- package/dist/utils/StringUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/UrlUtils.d.ts +2 -1
- package/dist/utils/UrlUtils.d.ts.map +1 -1
- package/dist/utils/UrlUtils.mjs +10 -3
- package/dist/utils/UrlUtils.mjs.map +1 -1
- package/lib/index-browser.cjs +2 -2
- package/lib/{index-node-DproT-OM.js → index-node-D2Z7LgyL.js} +18 -9
- package/lib/index-node-D2Z7LgyL.js.map +1 -0
- package/lib/index-node.cjs +2 -2
- package/lib/index.cjs +2 -2
- package/lib/types/authority/Authority.d.ts +1 -1
- package/lib/types/authority/Authority.d.ts.map +1 -1
- package/lib/types/cache/entities/AccountEntity.d.ts +1 -1
- package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -1
- package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/lib/types/config/ClientConfiguration.d.ts +9 -1
- package/lib/types/config/ClientConfiguration.d.ts.map +1 -1
- package/lib/types/crypto/ICrypto.d.ts +2 -2
- package/lib/types/crypto/ICrypto.d.ts.map +1 -1
- package/lib/types/error/NetworkError.d.ts +1 -1
- package/lib/types/error/NetworkError.d.ts.map +1 -1
- package/lib/types/logger/Logger.d.ts +1 -1
- package/lib/types/logger/Logger.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts +2 -1
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/request/BaseAuthRequest.d.ts +1 -1
- package/lib/types/request/BaseAuthRequest.d.ts.map +1 -1
- package/lib/types/utils/UrlUtils.d.ts +2 -1
- package/lib/types/utils/UrlUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/authority/Authority.ts +1 -1
- package/src/cache/entities/AccountEntity.ts +1 -1
- package/src/client/AuthorizationCodeClient.ts +5 -1
- package/src/config/ClientConfiguration.ts +10 -1
- package/src/crypto/ICrypto.ts +2 -2
- package/src/error/NetworkError.ts +3 -1
- package/src/logger/Logger.ts +1 -1
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +9 -3
- package/src/request/BaseAuthRequest.ts +1 -1
- package/src/utils/UrlUtils.ts +15 -2
- package/lib/index-node-DproT-OM.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INetworkModule } from "../network/INetworkModule.js";
|
|
2
2
|
import { ICrypto } from "../crypto/ICrypto.js";
|
|
3
3
|
import { ILoggerCallback, LogLevel } from "../logger/Logger.js";
|
|
4
|
-
import { Authority } from "../authority/Authority.js";
|
|
4
|
+
import type { Authority } from "../authority/Authority.js";
|
|
5
5
|
import { AzureCloudInstance } from "../authority/AuthorityOptions.js";
|
|
6
6
|
import { CacheManager } from "../cache/CacheManager.js";
|
|
7
7
|
import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js";
|
|
@@ -65,6 +65,7 @@ export type CommonClientConfiguration = {
|
|
|
65
65
|
* - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
|
|
66
66
|
* - instanceAware - A flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from.
|
|
67
67
|
* - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
|
|
68
|
+
* - encodeExtraQueryParams - A flag to choose whether to encode the extra query parameters or not. Defaults to false.
|
|
68
69
|
* @internal
|
|
69
70
|
*/
|
|
70
71
|
export type AuthOptions = {
|
|
@@ -75,6 +76,10 @@ export type AuthOptions = {
|
|
|
75
76
|
azureCloudOptions?: AzureCloudOptions;
|
|
76
77
|
skipAuthorityMetadataCache?: boolean;
|
|
77
78
|
instanceAware?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated This flag is deprecated and will be removed in the next major version where all extra query params will be encoded by default.
|
|
81
|
+
*/
|
|
82
|
+
encodeExtraQueryParams?: boolean;
|
|
78
83
|
};
|
|
79
84
|
/**
|
|
80
85
|
* Use this to configure token renewal info in the Configuration object
|
|
@@ -105,6 +110,9 @@ export type LoggerOptions = {
|
|
|
105
110
|
* - claimsBasedCachingEnabled - Sets whether tokens should be cached based on the claims hash. Default is false.
|
|
106
111
|
*/
|
|
107
112
|
export type CacheOptions = {
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated claimsBasedCachingEnabled is deprecated and will be removed in the next major version.
|
|
115
|
+
*/
|
|
108
116
|
claimsBasedCachingEnabled?: boolean;
|
|
109
117
|
};
|
|
110
118
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAiC,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAU,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMxE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAiC,OAAO,EAAE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
-
import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js";
|
|
1
|
+
import type { BaseAuthRequest } from "../request/BaseAuthRequest.js";
|
|
2
|
+
import type { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js";
|
|
3
3
|
/**
|
|
4
4
|
* The PkceCodes type describes the structure
|
|
5
5
|
* of objects that contain PKCE code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC1C,eAAe,EACb,uBAAuB,GACvB,oBAAoB,GACpB,WAAW,GACX,UAAU,GACV,YAAY,CACjB,GAAG;IACA,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC;;;OAGG;IACH,sBAAsB,CAClB,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD;;OAEG;IACH,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,OAAO,CACH,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,UAAU,EACvB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,6BAA6B,EAAE,OA+B3C,CAAC"}
|
|
@@ -15,5 +15,5 @@ export declare class NetworkError extends AuthError {
|
|
|
15
15
|
* @param responseHeaders - Response headers of the network request, when available
|
|
16
16
|
* @returns NetworkError object
|
|
17
17
|
*/
|
|
18
|
-
export declare function createNetworkError(error: AuthError, httpStatus?: number, responseHeaders?: Record<string, string
|
|
18
|
+
export declare function createNetworkError(error: AuthError, httpStatus?: number, responseHeaders?: Record<string, string>, additionalError?: Error): NetworkError;
|
|
19
19
|
//# sourceMappingURL=NetworkError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkError.d.ts","sourceRoot":"","sources":["../../../src/error/NetworkError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACvC,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAGrC,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAU/C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"NetworkError.d.ts","sourceRoot":"","sources":["../../../src/error/NetworkError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACvC,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAGrC,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAU/C;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACxC,eAAe,CAAC,EAAE,KAAK,GACxB,YAAY,CAGd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../src/logger/Logger.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../src/logger/Logger.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGtE;;GAEG;AACH,MAAM,MAAM,oBAAo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;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQzD;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQnD;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQzD;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQpD;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQvD;;OAEG;IACH,mBAAmB,IAAI,OAAO;CAGjC"}
|
|
@@ -5,6 +5,7 @@ import { Logger } from "../logger/Logger.js";
|
|
|
5
5
|
import { Authority } from "../authority/Authority.js";
|
|
6
6
|
import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload.js";
|
|
7
7
|
import { AuthorizeResponse } from "../response/AuthorizeResponse.js";
|
|
8
|
+
import { StringDict } from "../utils/MsalTypes.js";
|
|
8
9
|
/**
|
|
9
10
|
* Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR
|
|
10
11
|
* @param config
|
|
@@ -20,7 +21,7 @@ export declare function getStandardAuthorizeRequestParameters(authOptions: AuthO
|
|
|
20
21
|
* @param requestParameters
|
|
21
22
|
* @returns
|
|
22
23
|
*/
|
|
23
|
-
export declare function getAuthorizeUrl(authority: Authority, requestParameters: Map<string, string
|
|
24
|
+
export declare function getAuthorizeUrl(authority: Authority, requestParameters: Map<string, string>, encodeParams?: boolean, extraQueryParameters?: StringDict | undefined): string;
|
|
24
25
|
/**
|
|
25
26
|
* Handles the hash fragment response from public client code request. Returns a code response used by
|
|
26
27
|
* the client to exchange for a token in acquireToken.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorize.d.ts","sourceRoot":"","sources":["../../../src/protocol/Authorize.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"Authorize.d.ts","sourceRoot":"","sources":["../../../src/protocol/Authorize.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAUrE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CACjD,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,6BAA6B,EACtC,MAAM,EAAE,MAAM,EACd,iBAAiB,CAAC,EAAE,kBAAkB,GACvC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAsNrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,YAAY,CAAC,EAAE,OAAO,EACtB,oBAAoB,CAAC,EAAE,UAAU,GAAG,SAAS,GAC9C,MAAM,CAUR;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,YAAY,EAAE,iBAAiB,EAC/B,WAAW,EAAE,MAAM,GACpB,wBAAwB,CAY1B;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CACzC,cAAc,EAAE,iBAAiB,EACjC,YAAY,EAAE,MAAM,GACrB,IAAI,CAuEN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthenticationScheme } from "../utils/Constants.js";
|
|
2
|
-
import { AzureCloudOptions } from "../config/ClientConfiguration.js";
|
|
2
|
+
import type { AzureCloudOptions } from "../config/ClientConfiguration.js";
|
|
3
3
|
import { StringDict } from "../utils/MsalTypes.js";
|
|
4
4
|
import { StoreInCache } from "./StoreInCache.js";
|
|
5
5
|
import { ShrOptions } from "../crypto/SignedHttpRequest.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseAuthRequest.d.ts","sourceRoot":"","sources":["../../../src/request/BaseAuthRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAo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2
3
|
/**
|
|
3
4
|
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
|
4
5
|
* @param hashString
|
|
@@ -11,5 +12,5 @@ export declare function getDeserializedResponse(responseString: string): Authori
|
|
|
11
12
|
/**
|
|
12
13
|
* Utility to create a URL from the params map
|
|
13
14
|
*/
|
|
14
|
-
export declare function mapToQueryString(parameters: Map<string, string
|
|
15
|
+
export declare function mapToQueryString(parameters: Map<string, string>, encodeExtraParams?: boolean, extraQueryParameters?: StringDict): string;
|
|
15
16
|
//# sourceMappingURL=UrlUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/UrlUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"UrlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/UrlUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAKrE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAWtE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,cAAc,EAAE,MAAM,GACvB,iBAAiB,GAAG,IAAI,CA4B1B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC5B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,iBAAiB,GAAE,OAAc,EACjC,oBAAoB,CAAC,EAAE,UAAU,GAClC,MAAM,CAgBR"}
|
package/package.json
CHANGED
|
@@ -51,7 +51,7 @@ import { CloudDiscoveryMetadata } from "./CloudDiscoveryMetadata.js";
|
|
|
51
51
|
import { RegionDiscovery } from "./RegionDiscovery.js";
|
|
52
52
|
import { RegionDiscoveryMetadata } from "./RegionDiscoveryMetadata.js";
|
|
53
53
|
import { ImdsOptions } from "./ImdsOptions.js";
|
|
54
|
-
import { AzureCloudOptions } from "../config/ClientConfiguration.js";
|
|
54
|
+
import type { AzureCloudOptions } from "../config/ClientConfiguration.js";
|
|
55
55
|
import { Logger } from "../logger/Logger.js";
|
|
56
56
|
import { AuthError } from "../error/AuthError.js";
|
|
57
57
|
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { CacheAccountType, Separators } from "../../utils/Constants.js";
|
|
7
|
-
import { Authority } from "../../authority/Authority.js";
|
|
7
|
+
import type { Authority } from "../../authority/Authority.js";
|
|
8
8
|
import { ICrypto } from "../../crypto/ICrypto.js";
|
|
9
9
|
import { ClientInfo, buildClientInfo } from "../../account/ClientInfo.js";
|
|
10
10
|
import {
|
|
@@ -507,6 +507,10 @@ export class AuthorizationCodeClient extends BaseClient {
|
|
|
507
507
|
RequestParameterBuilder.addInstanceAware(parameters);
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
return UrlUtils.mapToQueryString(
|
|
510
|
+
return UrlUtils.mapToQueryString(
|
|
511
|
+
parameters,
|
|
512
|
+
this.config.authOptions.encodeExtraQueryParams,
|
|
513
|
+
request.extraQueryParameters
|
|
514
|
+
);
|
|
511
515
|
}
|
|
512
516
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
|
|
12
12
|
} from "../utils/Constants.js";
|
|
13
13
|
import { version } from "../packageMetadata.js";
|
|
14
|
-
import { Authority } from "../authority/Authority.js";
|
|
14
|
+
import type { Authority } from "../authority/Authority.js";
|
|
15
15
|
import { AzureCloudInstance } from "../authority/AuthorityOptions.js";
|
|
16
16
|
import { CacheManager, DefaultStorageClass } from "../cache/CacheManager.js";
|
|
17
17
|
import { ServerTelemetryManager } from "../telemetry/server/ServerTelemetryManager.js";
|
|
@@ -83,6 +83,7 @@ export type CommonClientConfiguration = {
|
|
|
83
83
|
* - skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
|
|
84
84
|
* - instanceAware - A flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from.
|
|
85
85
|
* - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
|
|
86
|
+
* - encodeExtraQueryParams - A flag to choose whether to encode the extra query parameters or not. Defaults to false.
|
|
86
87
|
* @internal
|
|
87
88
|
*/
|
|
88
89
|
export type AuthOptions = {
|
|
@@ -93,6 +94,10 @@ export type AuthOptions = {
|
|
|
93
94
|
azureCloudOptions?: AzureCloudOptions;
|
|
94
95
|
skipAuthorityMetadataCache?: boolean;
|
|
95
96
|
instanceAware?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated This flag is deprecated and will be removed in the next major version where all extra query params will be encoded by default.
|
|
99
|
+
*/
|
|
100
|
+
encodeExtraQueryParams?: boolean;
|
|
96
101
|
};
|
|
97
102
|
|
|
98
103
|
/**
|
|
@@ -126,6 +131,9 @@ export type LoggerOptions = {
|
|
|
126
131
|
* - claimsBasedCachingEnabled - Sets whether tokens should be cached based on the claims hash. Default is false.
|
|
127
132
|
*/
|
|
128
133
|
export type CacheOptions = {
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated claimsBasedCachingEnabled is deprecated and will be removed in the next major version.
|
|
136
|
+
*/
|
|
129
137
|
claimsBasedCachingEnabled?: boolean;
|
|
130
138
|
};
|
|
131
139
|
|
|
@@ -276,6 +284,7 @@ function buildAuthOptions(authOptions: AuthOptions): Required<AuthOptions> {
|
|
|
276
284
|
azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
|
|
277
285
|
skipAuthorityMetadataCache: false,
|
|
278
286
|
instanceAware: false,
|
|
287
|
+
encodeExtraQueryParams: false,
|
|
279
288
|
...authOptions,
|
|
280
289
|
};
|
|
281
290
|
}
|
package/src/crypto/ICrypto.ts
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
ClientAuthErrorCodes,
|
|
8
8
|
createClientAuthError,
|
|
9
9
|
} from "../error/ClientAuthError.js";
|
|
10
|
-
import { BaseAuthRequest } from "../request/BaseAuthRequest.js";
|
|
11
|
-
import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js";
|
|
10
|
+
import type { BaseAuthRequest } from "../request/BaseAuthRequest.js";
|
|
11
|
+
import type { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The PkceCodes type describes the structure
|
|
@@ -38,7 +38,9 @@ export class NetworkError extends AuthError {
|
|
|
38
38
|
export function createNetworkError(
|
|
39
39
|
error: AuthError,
|
|
40
40
|
httpStatus?: number,
|
|
41
|
-
responseHeaders?: Record<string, string
|
|
41
|
+
responseHeaders?: Record<string, string>,
|
|
42
|
+
additionalError?: Error
|
|
42
43
|
): NetworkError {
|
|
44
|
+
error.errorMessage = `${error.errorMessage}, additionalErrorInfo: error.name:${additionalError?.name}, error.message:${additionalError?.message}`;
|
|
43
45
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
44
46
|
}
|
package/src/logger/Logger.ts
CHANGED
package/src/packageMetadata.ts
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
isInteractionRequiredError,
|
|
27
27
|
} from "../error/InteractionRequiredAuthError.js";
|
|
28
28
|
import { ServerError } from "../error/ServerError.js";
|
|
29
|
+
import { StringDict } from "../utils/MsalTypes.js";
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR
|
|
@@ -264,10 +265,15 @@ export function getStandardAuthorizeRequestParameters(
|
|
|
264
265
|
*/
|
|
265
266
|
export function getAuthorizeUrl(
|
|
266
267
|
authority: Authority,
|
|
267
|
-
requestParameters: Map<string, string
|
|
268
|
+
requestParameters: Map<string, string>,
|
|
269
|
+
encodeParams?: boolean,
|
|
270
|
+
extraQueryParameters?: StringDict | undefined
|
|
268
271
|
): string {
|
|
269
|
-
const queryString = mapToQueryString(
|
|
270
|
-
|
|
272
|
+
const queryString = mapToQueryString(
|
|
273
|
+
requestParameters,
|
|
274
|
+
encodeParams,
|
|
275
|
+
extraQueryParameters
|
|
276
|
+
);
|
|
271
277
|
return UrlString.appendQueryString(
|
|
272
278
|
authority.authorizationEndpoint,
|
|
273
279
|
queryString
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { AuthenticationScheme } from "../utils/Constants.js";
|
|
7
|
-
import { AzureCloudOptions } from "../config/ClientConfiguration.js";
|
|
7
|
+
import type { AzureCloudOptions } from "../config/ClientConfiguration.js";
|
|
8
8
|
import { StringDict } from "../utils/MsalTypes.js";
|
|
9
9
|
import { StoreInCache } from "./StoreInCache.js";
|
|
10
10
|
import { ShrOptions } from "../crypto/SignedHttpRequest.js";
|
package/src/utils/UrlUtils.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
ClientAuthErrorCodes,
|
|
9
9
|
createClientAuthError,
|
|
10
10
|
} from "../error/ClientAuthError.js";
|
|
11
|
+
import { StringDict } from "./MsalTypes.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
|
@@ -64,11 +65,23 @@ export function getDeserializedResponse(
|
|
|
64
65
|
/**
|
|
65
66
|
* Utility to create a URL from the params map
|
|
66
67
|
*/
|
|
67
|
-
export function mapToQueryString(
|
|
68
|
+
export function mapToQueryString(
|
|
69
|
+
parameters: Map<string, string>,
|
|
70
|
+
encodeExtraParams: boolean = true,
|
|
71
|
+
extraQueryParameters?: StringDict
|
|
72
|
+
): string {
|
|
68
73
|
const queryParameterArray: Array<string> = new Array<string>();
|
|
69
74
|
|
|
70
75
|
parameters.forEach((value, key) => {
|
|
71
|
-
|
|
76
|
+
if (
|
|
77
|
+
!encodeExtraParams &&
|
|
78
|
+
extraQueryParameters &&
|
|
79
|
+
key in extraQueryParameters
|
|
80
|
+
) {
|
|
81
|
+
queryParameterArray.push(`${key}=${value}`);
|
|
82
|
+
} else {
|
|
83
|
+
queryParameterArray.push(`${key}=${encodeURIComponent(value)}`);
|
|
84
|
+
}
|
|
72
85
|
});
|
|
73
86
|
|
|
74
87
|
return queryParameterArray.join("&");
|