@azure/msal-browser 4.5.0 → 4.7.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/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +9 -3
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +7 -7
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.d.ts +9 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +58 -50
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.d.ts +1 -1
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.mjs +7 -5
- package/dist/event/EventHandler.mjs.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +2 -2
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +9 -4
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +6 -5
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/PopupRequest.d.ts +1 -2
- package/dist/request/PopupRequest.d.ts.map +1 -1
- package/dist/request/RedirectRequest.d.ts +1 -2
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/request/SilentRequest.d.ts +0 -1
- package/dist/request/SilentRequest.d.ts.map +1 -1
- package/dist/request/SsoSilentRequest.d.ts +2 -4
- package/dist/request/SsoSilentRequest.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +197 -168
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +197 -168
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +65 -64
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/cache/TokenCache.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts +9 -1
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/event/EventHandler.d.ts +1 -1
- package/lib/types/event/EventHandler.d.ts.map +1 -1
- package/lib/types/interaction_client/NativeInteractionClient.d.ts +2 -2
- package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/request/PopupRequest.d.ts +1 -2
- package/lib/types/request/PopupRequest.d.ts.map +1 -1
- package/lib/types/request/RedirectRequest.d.ts +1 -2
- package/lib/types/request/RedirectRequest.d.ts.map +1 -1
- package/lib/types/request/SilentRequest.d.ts +0 -1
- package/lib/types/request/SilentRequest.d.ts.map +1 -1
- package/lib/types/request/SsoSilentRequest.d.ts +2 -4
- package/lib/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/cache/BrowserCacheManager.ts +8 -2
- package/src/cache/TokenCache.ts +8 -7
- package/src/controllers/StandardController.ts +79 -54
- package/src/event/EventHandler.ts +9 -5
- package/src/interaction_client/NativeInteractionClient.ts +12 -3
- package/src/naa/mapping/NestedAppAuthAdapter.ts +8 -6
- package/src/packageMetadata.ts +1 -1
- package/src/request/PopupRequest.ts +1 -5
- package/src/request/RedirectRequest.ts +1 -5
- package/src/request/SilentRequest.ts +0 -1
- package/src/request/SsoSilentRequest.ts +2 -7
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
AccessTokenEntity,
|
|
30
30
|
TenantProfile,
|
|
31
31
|
buildTenantProfile,
|
|
32
|
+
TimeUtils,
|
|
32
33
|
} from "@azure/msal-common/browser";
|
|
33
34
|
import { isBridgeError } from "../BridgeError.js";
|
|
34
35
|
import { BridgeStatusCode } from "../BridgeStatusCode.js";
|
|
@@ -105,8 +106,9 @@ export class NestedAppAuthAdapter {
|
|
|
105
106
|
throw createClientAuthError(ClientAuthErrorCodes.nullOrEmptyToken);
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
// Request timestamp and AuthResult expires_in are in seconds, converting to Date for AuthenticationResult
|
|
110
|
+
const expiresOn = TimeUtils.toDateFromSeconds(
|
|
111
|
+
reqTimestamp + (response.token.expires_in || 0)
|
|
110
112
|
);
|
|
111
113
|
const idTokenClaims = AuthToken.extractTokenClaims(
|
|
112
114
|
response.token.id_token,
|
|
@@ -304,13 +306,13 @@ export class NestedAppAuthAdapter {
|
|
|
304
306
|
idTokenClaims: idTokenClaims || {},
|
|
305
307
|
accessToken: accessToken.secret,
|
|
306
308
|
fromCache: true,
|
|
307
|
-
expiresOn:
|
|
309
|
+
expiresOn: TimeUtils.toDateFromSeconds(accessToken.expiresOn),
|
|
310
|
+
extExpiresOn: TimeUtils.toDateFromSeconds(
|
|
311
|
+
accessToken.extendedExpiresOn
|
|
312
|
+
),
|
|
308
313
|
tokenType:
|
|
309
314
|
request.authenticationScheme || AuthenticationScheme.BEARER,
|
|
310
315
|
correlationId,
|
|
311
|
-
extExpiresOn: new Date(
|
|
312
|
-
Number(accessToken.extendedExpiresOn) * 1000
|
|
313
|
-
),
|
|
314
316
|
state: request.state,
|
|
315
317
|
};
|
|
316
318
|
|
package/src/packageMetadata.ts
CHANGED
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
CommonAuthorizationUrlRequest,
|
|
8
|
-
StringDict,
|
|
9
|
-
} from "@azure/msal-common/browser";
|
|
6
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
10
7
|
import { PopupWindowAttributes } from "./PopupWindowAttributes.js";
|
|
11
8
|
|
|
12
9
|
/**
|
|
@@ -51,6 +48,5 @@ export type PopupRequest = Partial<
|
|
|
51
48
|
> & {
|
|
52
49
|
scopes: Array<string>;
|
|
53
50
|
popupWindowAttributes?: PopupWindowAttributes;
|
|
54
|
-
tokenBodyParameters?: StringDict;
|
|
55
51
|
popupWindowParent?: Window;
|
|
56
52
|
};
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
CommonAuthorizationUrlRequest,
|
|
8
|
-
StringDict,
|
|
9
|
-
} from "@azure/msal-common/browser";
|
|
6
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* RedirectRequest: Request object passed by user to retrieve a Code from the
|
|
@@ -55,5 +52,4 @@ export type RedirectRequest = Partial<
|
|
|
55
52
|
* Set onRedirectNavigate in Configuration instead.
|
|
56
53
|
*/
|
|
57
54
|
onRedirectNavigate?: (url: string) => boolean | void;
|
|
58
|
-
tokenBodyParameters?: StringDict;
|
|
59
55
|
};
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
CommonAuthorizationUrlRequest,
|
|
8
|
-
StringDict,
|
|
9
|
-
} from "@azure/msal-common/browser";
|
|
6
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* Request object passed by user to ssoSilent to retrieve a Code from the server (first leg of authorization code grant flow)
|
|
@@ -42,6 +39,4 @@ export type SsoSilentRequest = Partial<
|
|
|
42
39
|
| "requestedClaimsHash"
|
|
43
40
|
| "platformBroker"
|
|
44
41
|
>
|
|
45
|
-
|
|
46
|
-
tokenBodyParameters?: StringDict;
|
|
47
|
-
};
|
|
42
|
+
>;
|