@azure/msal-common 15.6.0 → 15.7.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/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.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.d.ts.map +1 -1
- package/dist/authority/RegionDiscovery.mjs +6 -9
- package/dist/authority/RegionDiscovery.mjs.map +1 -1
- package/dist/cache/CacheManager.d.ts +7 -7
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.mjs +27 -34
- package/dist/cache/CacheManager.mjs.map +1 -1
- package/dist/cache/entities/AccountEntity.mjs +1 -1
- package/dist/cache/interface/ICacheManager.d.ts +4 -4
- package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/CacheHelpers.mjs +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +1 -1
- package/dist/client/BaseClient.mjs +1 -1
- package/dist/client/RefreshTokenClient.mjs +1 -1
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.mjs +2 -2
- package/dist/client/SilentFlowClient.mjs.map +1 -1
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.mjs +3 -2
- package/dist/config/ClientConfiguration.mjs.map +1 -1
- package/dist/constants/AADServerParamKeys.mjs +1 -1
- package/dist/crypto/ICrypto.d.ts +1 -1
- 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.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +4 -2
- package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.d.ts +1 -0
- package/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +3 -2
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs.map +1 -1
- package/dist/error/JoseHeaderError.mjs +1 -1
- package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
- package/dist/error/NetworkError.mjs +1 -1
- package/dist/error/ServerError.mjs +1 -1
- package/dist/exports-common.d.ts +1 -1
- package/dist/exports-common.d.ts.map +1 -1
- package/dist/index-browser.mjs +2 -2
- package/dist/index-node.mjs +2 -2
- package/dist/index.mjs +2 -2
- 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.mjs +1 -1
- package/dist/request/AuthenticationHeaderParser.mjs +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.d.ts +4 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs.map +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.d.ts +6 -8
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +8 -10
- package/dist/utils/Constants.mjs.map +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.mjs +1 -1
- package/lib/index-browser.cjs +5 -81
- package/lib/index-browser.cjs.map +1 -1
- package/lib/{index-node-CnK83wp7.js → index-node-B6ITzmFz.js} +125 -53
- package/lib/index-node-B6ITzmFz.js.map +1 -0
- package/lib/index-node.cjs +3 -2
- package/lib/index-node.cjs.map +1 -1
- package/lib/index.cjs +4 -3
- package/lib/index.cjs.map +1 -1
- package/lib/types/authority/RegionDiscovery.d.ts.map +1 -1
- package/lib/types/cache/CacheManager.d.ts +7 -7
- package/lib/types/cache/CacheManager.d.ts.map +1 -1
- package/lib/types/cache/interface/ICacheManager.d.ts +4 -4
- package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -1
- package/lib/types/client/SilentFlowClient.d.ts.map +1 -1
- package/lib/types/config/ClientConfiguration.d.ts.map +1 -1
- package/lib/types/crypto/ICrypto.d.ts +1 -1
- package/lib/types/crypto/ICrypto.d.ts.map +1 -1
- package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +1 -0
- package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -1
- package/lib/types/exports-common.d.ts +1 -1
- package/lib/types/exports-common.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts +4 -0
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/lib/types/utils/Constants.d.ts +6 -8
- package/lib/types/utils/Constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/authority/RegionDiscovery.ts +5 -10
- package/src/cache/CacheManager.ts +44 -39
- package/src/cache/interface/ICacheManager.ts +4 -4
- package/src/client/SilentFlowClient.ts +1 -3
- package/src/config/ClientConfiguration.ts +3 -1
- package/src/crypto/ICrypto.ts +2 -2
- package/src/error/InteractionRequiredAuthError.ts +3 -0
- package/src/error/InteractionRequiredAuthErrorCodes.ts +1 -0
- package/src/exports-common.ts +1 -0
- package/src/packageMetadata.ts +1 -1
- package/src/telemetry/performance/PerformanceEvent.ts +5 -0
- package/src/utils/Constants.ts +7 -9
- package/lib/index-node-CnK83wp7.js.map +0 -1
|
@@ -197,19 +197,19 @@ export interface ICacheManager {
|
|
|
197
197
|
/**
|
|
198
198
|
* Removes all accounts and related tokens from cache.
|
|
199
199
|
*/
|
|
200
|
-
removeAllAccounts():
|
|
200
|
+
removeAllAccounts(correlationId: string): void;
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
203
|
* returns a boolean if the given account is removed
|
|
204
204
|
* @param account
|
|
205
205
|
*/
|
|
206
|
-
removeAccount(accountKey: string):
|
|
206
|
+
removeAccount(accountKey: string, correlationId: string): void;
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
209
|
* returns a boolean if the given account is removed
|
|
210
210
|
* @param account
|
|
211
211
|
*/
|
|
212
|
-
removeAccountContext(account: AccountEntity):
|
|
212
|
+
removeAccountContext(account: AccountEntity, correlationId: string): void;
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* @param key
|
|
@@ -219,7 +219,7 @@ export interface ICacheManager {
|
|
|
219
219
|
/**
|
|
220
220
|
* @param key
|
|
221
221
|
*/
|
|
222
|
-
removeAccessToken(key: string):
|
|
222
|
+
removeAccessToken(key: string, correlationId: string): void;
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* @param key
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
ClientAuthErrorCodes,
|
|
24
24
|
createClientAuthError,
|
|
25
25
|
} from "../error/ClientAuthError.js";
|
|
26
|
+
import { StubPerformanceClient } from "../telemetry/performance/StubPerformanceClient.js";
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL.
|
|
@@ -260,7 +261,8 @@ export function buildClientConfiguration({
|
|
|
260
261
|
new DefaultStorageClass(
|
|
261
262
|
userAuthOptions.clientId,
|
|
262
263
|
DEFAULT_CRYPTO_IMPLEMENTATION,
|
|
263
|
-
new Logger(loggerOptions)
|
|
264
|
+
new Logger(loggerOptions),
|
|
265
|
+
new StubPerformanceClient()
|
|
264
266
|
),
|
|
265
267
|
networkInterface:
|
|
266
268
|
networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
|
package/src/crypto/ICrypto.ts
CHANGED
|
@@ -70,7 +70,7 @@ export interface ICrypto {
|
|
|
70
70
|
* Removes cryptographic keypair from key store matching the keyId passed in
|
|
71
71
|
* @param kid
|
|
72
72
|
*/
|
|
73
|
-
removeTokenBindingKey(kid: string): Promise<
|
|
73
|
+
removeTokenBindingKey(kid: string): Promise<void>;
|
|
74
74
|
/**
|
|
75
75
|
* Removes all cryptographic keys from IndexedDB storage
|
|
76
76
|
*/
|
|
@@ -111,7 +111,7 @@ export const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto = {
|
|
|
111
111
|
async getPublicKeyThumbprint(): Promise<string> {
|
|
112
112
|
throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented);
|
|
113
113
|
},
|
|
114
|
-
async removeTokenBindingKey(): Promise<
|
|
114
|
+
async removeTokenBindingKey(): Promise<void> {
|
|
115
115
|
throw createClientAuthError(ClientAuthErrorCodes.methodNotImplemented);
|
|
116
116
|
},
|
|
117
117
|
async clearKeystore(): Promise<boolean> {
|
|
@@ -16,6 +16,7 @@ export const InteractionRequiredServerErrorMessage = [
|
|
|
16
16
|
InteractionRequiredAuthErrorCodes.consentRequired,
|
|
17
17
|
InteractionRequiredAuthErrorCodes.loginRequired,
|
|
18
18
|
InteractionRequiredAuthErrorCodes.badToken,
|
|
19
|
+
InteractionRequiredAuthErrorCodes.uxNotAllowed,
|
|
19
20
|
];
|
|
20
21
|
|
|
21
22
|
export const InteractionRequiredAuthSubErrorMessage = [
|
|
@@ -36,6 +37,8 @@ const InteractionRequiredAuthErrorMessages = {
|
|
|
36
37
|
"Refresh token has expired.",
|
|
37
38
|
[InteractionRequiredAuthErrorCodes.badToken]:
|
|
38
39
|
"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",
|
|
40
|
+
[InteractionRequiredAuthErrorCodes.uxNotAllowed]:
|
|
41
|
+
"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve.",
|
|
39
42
|
};
|
|
40
43
|
|
|
41
44
|
/**
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export const noTokensFound = "no_tokens_found";
|
|
8
8
|
export const nativeAccountUnavailable = "native_account_unavailable";
|
|
9
9
|
export const refreshTokenExpired = "refresh_token_expired";
|
|
10
|
+
export const uxNotAllowed = "ux_not_allowed";
|
|
10
11
|
|
|
11
12
|
// Codes potentially returned by server
|
|
12
13
|
export const interactionRequired = "interaction_required";
|
package/src/exports-common.ts
CHANGED
package/src/packageMetadata.ts
CHANGED
|
@@ -703,6 +703,11 @@ export type PerformanceEvent = {
|
|
|
703
703
|
*/
|
|
704
704
|
libraryVersion: string;
|
|
705
705
|
|
|
706
|
+
/**
|
|
707
|
+
* Version of the library used last. Used to track upgrades and downgrades
|
|
708
|
+
*/
|
|
709
|
+
previousLibraryVersion?: string;
|
|
710
|
+
|
|
706
711
|
/**
|
|
707
712
|
* Whether the response is from a native component (e.g., WAM)
|
|
708
713
|
*
|
package/src/utils/Constants.ts
CHANGED
|
@@ -326,15 +326,6 @@ export const PasswordGrantConstants = {
|
|
|
326
326
|
export type PasswordGrantConstants =
|
|
327
327
|
(typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants];
|
|
328
328
|
|
|
329
|
-
/**
|
|
330
|
-
* Response codes
|
|
331
|
-
*/
|
|
332
|
-
export const ResponseCodes = {
|
|
333
|
-
httpSuccess: 200,
|
|
334
|
-
httpBadRequest: 400,
|
|
335
|
-
} as const;
|
|
336
|
-
export type ResponseCodes = (typeof ResponseCodes)[keyof typeof ResponseCodes];
|
|
337
|
-
|
|
338
329
|
/**
|
|
339
330
|
* Region Discovery Sources
|
|
340
331
|
*/
|
|
@@ -389,3 +380,10 @@ export const ONE_DAY_IN_MS = 86400000;
|
|
|
389
380
|
|
|
390
381
|
// Token renewal offset default in seconds
|
|
391
382
|
export const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
383
|
+
|
|
384
|
+
export const EncodingTypes = {
|
|
385
|
+
BASE64: "base64",
|
|
386
|
+
HEX: "hex",
|
|
387
|
+
UTF8: "utf-8",
|
|
388
|
+
} as const;
|
|
389
|
+
export type EncodingTypes = (typeof EncodingTypes)[keyof typeof EncodingTypes];
|