@azure/msal-common 15.14.2 → 15.16.0
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.mjs +1 -1
- package/dist/cache/CacheManager.mjs +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.mjs +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.mjs +1 -1
- package/dist/constants/AADServerParamKeys.mjs +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 +4 -0
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +9 -2
- package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.d.ts +37 -0
- package/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +40 -5
- 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/PlatformBrokerError.mjs +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.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/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 +12 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +7 -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.mjs +1 -1
- package/dist/utils/FunctionWrappers.mjs +1 -1
- package/dist/utils/ProtocolUtils.mjs +1 -1
- package/dist/utils/StringUtils.d.ts +25 -0
- package/dist/utils/StringUtils.d.ts.map +1 -1
- package/dist/utils/StringUtils.mjs +40 -1
- package/dist/utils/StringUtils.mjs.map +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/UrlUtils.mjs +1 -1
- package/lib/index-browser.cjs +2 -2
- package/lib/{index-node-CYiBwGSg.js → index-node-BovRRhfW.js} +94 -6
- package/lib/index-node-BovRRhfW.js.map +1 -0
- package/lib/index-node.cjs +2 -2
- package/lib/index.cjs +2 -2
- package/lib/types/error/InteractionRequiredAuthError.d.ts +4 -0
- package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +37 -0
- package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts +12 -0
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/lib/types/utils/StringUtils.d.ts +25 -0
- package/lib/types/utils/StringUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/error/InteractionRequiredAuthError.ts +10 -0
- package/src/error/InteractionRequiredAuthErrorCodes.ts +37 -2
- package/src/packageMetadata.ts +1 -1
- package/src/telemetry/performance/PerformanceEvent.ts +15 -0
- package/src/utils/StringUtils.ts +48 -0
- package/lib/index-node-CYiBwGSg.js.map +0 -1
|
@@ -1,9 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MSAL-defined interaction required error code indicating no tokens are found in cache.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
1
5
|
export declare const noTokensFound = "no_tokens_found";
|
|
6
|
+
/**
|
|
7
|
+
* MSAL-defined error code indicating a native account is unavailable on the platform.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export declare const nativeAccountUnavailable = "native_account_unavailable";
|
|
11
|
+
/**
|
|
12
|
+
* MSAL-defined error code indicating the refresh token has expired and user interaction is needed.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
3
15
|
export declare const refreshTokenExpired = "refresh_token_expired";
|
|
16
|
+
/**
|
|
17
|
+
* MSAL-defined error code indicating UI/UX is not allowed (e.g., blocked by policy), requiring alternate interaction.
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
4
20
|
export declare const uxNotAllowed = "ux_not_allowed";
|
|
21
|
+
/**
|
|
22
|
+
* Server-originated error code indicating interaction is required to complete the request.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
5
25
|
export declare const interactionRequired = "interaction_required";
|
|
26
|
+
/**
|
|
27
|
+
* Server-originated error code indicating user consent is required.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
6
30
|
export declare const consentRequired = "consent_required";
|
|
31
|
+
/**
|
|
32
|
+
* Server-originated error code indicating user login is required.
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
7
35
|
export declare const loginRequired = "login_required";
|
|
36
|
+
/**
|
|
37
|
+
* Server-originated error code indicating the token is invalid or corrupted.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
8
40
|
export declare const badToken = "bad_token";
|
|
41
|
+
/**
|
|
42
|
+
* Server-originated error code indicating the user was interrupted and must reattempt the flow.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare const interruptedUser = "interrupted_user";
|
|
9
46
|
//# sourceMappingURL=InteractionRequiredAuthErrorCodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionRequiredAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/InteractionRequiredAuthErrorCodes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InteractionRequiredAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/InteractionRequiredAuthErrorCodes.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C;;;GAGG;AACH,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AACrE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D;;;GAGG;AACH,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD;;;GAGG;AACH,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C;;;GAGG;AACH,eAAO,MAAM,QAAQ,cAAc,CAAC;AACpC;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAAqB,CAAC"}
|
|
@@ -256,6 +256,11 @@ export declare const PerformanceEvents: {
|
|
|
256
256
|
readonly LoadIdToken: "loadIdToken";
|
|
257
257
|
readonly LoadAccessToken: "loadAccessToken";
|
|
258
258
|
readonly LoadRefreshToken: "loadRefreshToken";
|
|
259
|
+
/**
|
|
260
|
+
* SSO capability verification call (msal-browser).
|
|
261
|
+
* Fire-and-forget SSO verification call made after interactive authentication completes.
|
|
262
|
+
*/
|
|
263
|
+
readonly SsoCapable: "ssoCapable";
|
|
259
264
|
};
|
|
260
265
|
export type PerformanceEvents = (typeof PerformanceEvents)[keyof typeof PerformanceEvents];
|
|
261
266
|
export declare const PerformanceEventAbbreviations: ReadonlyMap<string, string>;
|
|
@@ -414,6 +419,13 @@ export type PerformanceEvent = {
|
|
|
414
419
|
* @type {?number}
|
|
415
420
|
*/
|
|
416
421
|
cacheLookupPolicy?: number | undefined;
|
|
422
|
+
/**
|
|
423
|
+
* Reason for silent refresh fallback to iframe
|
|
424
|
+
* Format: errorCode or errorCode|subError
|
|
425
|
+
*
|
|
426
|
+
* @type {?string}
|
|
427
|
+
*/
|
|
428
|
+
silentRefreshReason?: string;
|
|
417
429
|
/**
|
|
418
430
|
* Cache Outcome
|
|
419
431
|
* @type {?number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceEvent.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/performance/PerformanceEvent.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;IAC1B;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;;IAIH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAIH;;;OAGG;;IAGH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;;;IAMH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAGH;;OAEG;;IAIH;;OAEG;;IAIH;;OAEG;;IAIH;;;OAGG;;;;IAMH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;;;IAOH;;OAEG;;IAGH;;OAEG;;;;;IAMH;;OAEG;;;;IAQH;;OAEG;;;IAIH;;OAEG;;;;;;;IAQH;;OAEG;;;;IAKH;;OAEG;;;IAIH;;OAEG;;;IAIH;;OAEG;;;;;;;;;IAgBH;;OAEG;;;;;;;;;;;;;;IAyBH;;OAEG;;;;;;IAOH;;OAEG;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PerformanceEvent.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/performance/PerformanceEvent.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;IAC1B;;;OAGG;;IAGH;;;OAGG;;IAGH;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IAEvB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAG9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,uBAAuB,GAAG;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAyBxC,CAAC"}
|
|
@@ -37,5 +37,30 @@ export declare class StringUtils {
|
|
|
37
37
|
* @param input String to match against
|
|
38
38
|
*/
|
|
39
39
|
static matchPattern(pattern: string, input: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Tests if a given string matches a given pattern using stricter, anchored matching semantics.
|
|
42
|
+
*
|
|
43
|
+
* Differences from `matchPattern` (legacy):
|
|
44
|
+
* - All regex metacharacters (including `.`) in the pattern are treated as literals,
|
|
45
|
+
* so `example.com` matches only `example.com` and not `exampleXcom`.
|
|
46
|
+
* - The generated regex is anchored with `^` and `$` so partial/substring matches
|
|
47
|
+
* are not allowed.
|
|
48
|
+
* - `*` is the only supported wildcard. Its behaviour depends on the URL component:
|
|
49
|
+
* - `host` component: `*` matches any sequence of characters that does NOT include
|
|
50
|
+
* a dot (`.`), keeping wildcards within a single DNS label boundary.
|
|
51
|
+
* - All other components: `*` matches any sequence of characters (including `/`).
|
|
52
|
+
*
|
|
53
|
+
* @param pattern - The `protectedResourceMap` key pattern to match against. `*` is a
|
|
54
|
+
* multi-character wildcard; all other characters are treated as literals.
|
|
55
|
+
* @param input - The URL component value (e.g. host, pathname) extracted from the
|
|
56
|
+
* outgoing request URL to test against the pattern.
|
|
57
|
+
* @param options - Optional. Provide `component` to enable component-aware wildcard
|
|
58
|
+
* semantics. Accepted values: `"host"`, `"path"`, `"protocol"`, `"search"`,
|
|
59
|
+
* `"hash"`. Defaults to path-style (permissive) matching when omitted.
|
|
60
|
+
* @returns `true` if the full input string matches the pattern; `false` otherwise.
|
|
61
|
+
*/
|
|
62
|
+
static matchPatternStrict(pattern: string, input: string, options?: {
|
|
63
|
+
component?: "host" | "path" | "protocol" | "search" | "hash";
|
|
64
|
+
}): boolean;
|
|
40
65
|
}
|
|
41
66
|
//# sourceMappingURL=StringUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/StringUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,WAAW;IACpB;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;IAU3C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvD,MAAM,CAAC,QAAQ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AAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAMrE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAQhD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAgB5D;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,kBAAkB,CACrB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QACN,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;KAChE,GACF,OAAO;CAmBb"}
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ export const InteractionRequiredServerErrorMessage = [
|
|
|
17
17
|
InteractionRequiredAuthErrorCodes.loginRequired,
|
|
18
18
|
InteractionRequiredAuthErrorCodes.badToken,
|
|
19
19
|
InteractionRequiredAuthErrorCodes.uxNotAllowed,
|
|
20
|
+
InteractionRequiredAuthErrorCodes.interruptedUser,
|
|
20
21
|
];
|
|
21
22
|
|
|
22
23
|
export const InteractionRequiredAuthSubErrorMessage = [
|
|
@@ -26,6 +27,7 @@ export const InteractionRequiredAuthSubErrorMessage = [
|
|
|
26
27
|
"user_password_expired",
|
|
27
28
|
"consent_required",
|
|
28
29
|
"bad_token",
|
|
30
|
+
"interrupted_user",
|
|
29
31
|
];
|
|
30
32
|
|
|
31
33
|
const InteractionRequiredAuthErrorMessages = {
|
|
@@ -39,6 +41,8 @@ const InteractionRequiredAuthErrorMessages = {
|
|
|
39
41
|
"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",
|
|
40
42
|
[InteractionRequiredAuthErrorCodes.uxNotAllowed]:
|
|
41
43
|
"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve.",
|
|
44
|
+
[InteractionRequiredAuthErrorCodes.interruptedUser]:
|
|
45
|
+
"The user could not be authenticated due to an interrupted state. Please invoke an interactive API to resolve.",
|
|
42
46
|
};
|
|
43
47
|
|
|
44
48
|
/**
|
|
@@ -64,6 +68,12 @@ export const InteractionRequiredAuthErrorMessage = {
|
|
|
64
68
|
InteractionRequiredAuthErrorCodes.badToken
|
|
65
69
|
],
|
|
66
70
|
},
|
|
71
|
+
interrupted_user: {
|
|
72
|
+
code: InteractionRequiredAuthErrorCodes.interruptedUser,
|
|
73
|
+
desc: InteractionRequiredAuthErrorMessages[
|
|
74
|
+
InteractionRequiredAuthErrorCodes.interruptedUser
|
|
75
|
+
],
|
|
76
|
+
},
|
|
67
77
|
};
|
|
68
78
|
|
|
69
79
|
/**
|
|
@@ -3,14 +3,49 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* MSAL-defined interaction required error code indicating no tokens are found in cache.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
7
10
|
export const noTokensFound = "no_tokens_found";
|
|
11
|
+
/**
|
|
12
|
+
* MSAL-defined error code indicating a native account is unavailable on the platform.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
8
15
|
export const nativeAccountUnavailable = "native_account_unavailable";
|
|
16
|
+
/**
|
|
17
|
+
* MSAL-defined error code indicating the refresh token has expired and user interaction is needed.
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
9
20
|
export const refreshTokenExpired = "refresh_token_expired";
|
|
21
|
+
/**
|
|
22
|
+
* MSAL-defined error code indicating UI/UX is not allowed (e.g., blocked by policy), requiring alternate interaction.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
10
25
|
export const uxNotAllowed = "ux_not_allowed";
|
|
11
26
|
|
|
12
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Server-originated error code indicating interaction is required to complete the request.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
13
31
|
export const interactionRequired = "interaction_required";
|
|
32
|
+
/**
|
|
33
|
+
* Server-originated error code indicating user consent is required.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
14
36
|
export const consentRequired = "consent_required";
|
|
37
|
+
/**
|
|
38
|
+
* Server-originated error code indicating user login is required.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
15
41
|
export const loginRequired = "login_required";
|
|
42
|
+
/**
|
|
43
|
+
* Server-originated error code indicating the token is invalid or corrupted.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
16
46
|
export const badToken = "bad_token";
|
|
47
|
+
/**
|
|
48
|
+
* Server-originated error code indicating the user was interrupted and must reattempt the flow.
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export const interruptedUser = "interrupted_user";
|
package/src/packageMetadata.ts
CHANGED
|
@@ -328,6 +328,12 @@ export const PerformanceEvents = {
|
|
|
328
328
|
LoadIdToken: "loadIdToken",
|
|
329
329
|
LoadAccessToken: "loadAccessToken",
|
|
330
330
|
LoadRefreshToken: "loadRefreshToken",
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* SSO capability verification call (msal-browser).
|
|
334
|
+
* Fire-and-forget SSO verification call made after interactive authentication completes.
|
|
335
|
+
*/
|
|
336
|
+
SsoCapable: "ssoCapable",
|
|
331
337
|
} as const;
|
|
332
338
|
export type PerformanceEvents =
|
|
333
339
|
(typeof PerformanceEvents)[keyof typeof PerformanceEvents];
|
|
@@ -563,6 +569,7 @@ export const PerformanceEventAbbreviations: ReadonlyMap<string, string> =
|
|
|
563
569
|
[PerformanceEvents.Decrypt, "decrypt"],
|
|
564
570
|
[PerformanceEvents.GenerateEarKey, "genEarKey"],
|
|
565
571
|
[PerformanceEvents.DecryptEarResponse, "decryptEarResp"],
|
|
572
|
+
[PerformanceEvents.SsoCapable, "SsoCapable"],
|
|
566
573
|
]);
|
|
567
574
|
|
|
568
575
|
/**
|
|
@@ -745,6 +752,14 @@ export type PerformanceEvent = {
|
|
|
745
752
|
*/
|
|
746
753
|
cacheLookupPolicy?: number | undefined;
|
|
747
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Reason for silent refresh fallback to iframe
|
|
757
|
+
* Format: errorCode or errorCode|subError
|
|
758
|
+
*
|
|
759
|
+
* @type {?string}
|
|
760
|
+
*/
|
|
761
|
+
silentRefreshReason?: string;
|
|
762
|
+
|
|
748
763
|
/**
|
|
749
764
|
* Cache Outcome
|
|
750
765
|
* @type {?number}
|
package/src/utils/StringUtils.ts
CHANGED
|
@@ -103,4 +103,52 @@ export class StringUtils {
|
|
|
103
103
|
|
|
104
104
|
return regex.test(input);
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Tests if a given string matches a given pattern using stricter, anchored matching semantics.
|
|
109
|
+
*
|
|
110
|
+
* Differences from `matchPattern` (legacy):
|
|
111
|
+
* - All regex metacharacters (including `.`) in the pattern are treated as literals,
|
|
112
|
+
* so `example.com` matches only `example.com` and not `exampleXcom`.
|
|
113
|
+
* - The generated regex is anchored with `^` and `$` so partial/substring matches
|
|
114
|
+
* are not allowed.
|
|
115
|
+
* - `*` is the only supported wildcard. Its behaviour depends on the URL component:
|
|
116
|
+
* - `host` component: `*` matches any sequence of characters that does NOT include
|
|
117
|
+
* a dot (`.`), keeping wildcards within a single DNS label boundary.
|
|
118
|
+
* - All other components: `*` matches any sequence of characters (including `/`).
|
|
119
|
+
*
|
|
120
|
+
* @param pattern - The `protectedResourceMap` key pattern to match against. `*` is a
|
|
121
|
+
* multi-character wildcard; all other characters are treated as literals.
|
|
122
|
+
* @param input - The URL component value (e.g. host, pathname) extracted from the
|
|
123
|
+
* outgoing request URL to test against the pattern.
|
|
124
|
+
* @param options - Optional. Provide `component` to enable component-aware wildcard
|
|
125
|
+
* semantics. Accepted values: `"host"`, `"path"`, `"protocol"`, `"search"`,
|
|
126
|
+
* `"hash"`. Defaults to path-style (permissive) matching when omitted.
|
|
127
|
+
* @returns `true` if the full input string matches the pattern; `false` otherwise.
|
|
128
|
+
*/
|
|
129
|
+
static matchPatternStrict(
|
|
130
|
+
pattern: string,
|
|
131
|
+
input: string,
|
|
132
|
+
options?: {
|
|
133
|
+
component?: "host" | "path" | "protocol" | "search" | "hash";
|
|
134
|
+
}
|
|
135
|
+
): boolean {
|
|
136
|
+
const component = options?.component;
|
|
137
|
+
|
|
138
|
+
// Step 1: Escape all regex special characters so literals are matched literally.
|
|
139
|
+
let regexBody = pattern.replace(/[.+^${}()|[\]\\*?]/g, "\\$&");
|
|
140
|
+
|
|
141
|
+
// Step 2: Replace the escaped '*' with its component-aware regex equivalent.
|
|
142
|
+
if (component === "host") {
|
|
143
|
+
regexBody = regexBody.replace(/\\\*/g, "[^.]*");
|
|
144
|
+
} else {
|
|
145
|
+
// PATH, PROTOCOL, SEARCH, HASH, or unspecified: '*' matches any characters.
|
|
146
|
+
regexBody = regexBody.replace(/\\\*/g, ".*");
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Step 3: Anchor for full-string matching.
|
|
150
|
+
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
151
|
+
const regex = new RegExp(`^${regexBody}$`);
|
|
152
|
+
return regex.test(input);
|
|
153
|
+
}
|
|
106
154
|
}
|