@azure/msal-browser 3.16.0 → 3.17.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/NativeRequest.d.ts +1 -0
- package/dist/broker/nativeBroker/NativeRequest.d.ts.map +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.mjs +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +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.mjs +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.d.ts +11 -0
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.mjs +16 -1
- package/dist/crypto/CryptoOps.mjs.map +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.d.ts +5 -0
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.mjs +7 -2
- package/dist/error/BrowserAuthError.mjs.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +3 -2
- package/dist/error/BrowserAuthErrorCodes.mjs.map +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.mjs +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.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +30 -12
- 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.mjs +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/RequestHelpers.mjs +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 +160 -88
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +160 -88
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +60 -60
- package/package.json +2 -2
- package/src/broker/nativeBroker/NativeRequest.ts +1 -0
- package/src/crypto/CryptoOps.ts +17 -0
- package/src/error/BrowserAuthError.ts +8 -0
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/NativeInteractionClient.ts +47 -16
- package/src/packageMetadata.ts +1 -1
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.17.0 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v14.
|
|
9
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
// Token renewal offset default in seconds
|
|
315
315
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
316
316
|
|
|
317
|
-
/*! @azure/msal-common v14.
|
|
317
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
318
318
|
/*
|
|
319
319
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
320
320
|
* Licensed under the MIT License.
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
unexpectedError: unexpectedError
|
|
332
332
|
});
|
|
333
333
|
|
|
334
|
-
/*! @azure/msal-common v14.
|
|
334
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
335
335
|
|
|
336
336
|
/*
|
|
337
337
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
: AuthErrorMessages[code]);
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
/*! @azure/msal-common v14.
|
|
383
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
384
384
|
/*
|
|
385
385
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
386
386
|
* Licensed under the MIT License.
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
userTimeoutReached: userTimeoutReached
|
|
479
479
|
});
|
|
480
480
|
|
|
481
|
-
/*! @azure/msal-common v14.
|
|
481
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
482
482
|
|
|
483
483
|
/*
|
|
484
484
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
/*! @azure/msal-common v14.
|
|
733
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
734
734
|
|
|
735
735
|
/*
|
|
736
736
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
793
|
|
|
794
|
-
/*! @azure/msal-common v14.
|
|
794
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
795
795
|
/*
|
|
796
796
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
797
797
|
* Licensed under the MIT License.
|
|
@@ -806,7 +806,7 @@
|
|
|
806
806
|
Ciam: 3,
|
|
807
807
|
};
|
|
808
808
|
|
|
809
|
-
/*! @azure/msal-common v14.
|
|
809
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
810
810
|
/*
|
|
811
811
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
812
812
|
* Licensed under the MIT License.
|
|
@@ -818,7 +818,7 @@
|
|
|
818
818
|
response.hasOwnProperty("jwks_uri"));
|
|
819
819
|
}
|
|
820
820
|
|
|
821
|
-
/*! @azure/msal-common v14.
|
|
821
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
822
822
|
/*
|
|
823
823
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
824
824
|
* Licensed under the MIT License.
|
|
@@ -872,7 +872,7 @@
|
|
|
872
872
|
urlParseError: urlParseError
|
|
873
873
|
});
|
|
874
874
|
|
|
875
|
-
/*! @azure/msal-common v14.
|
|
875
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
876
876
|
|
|
877
877
|
/*
|
|
878
878
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
return new ClientConfigurationError(errorCode);
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
-
/*! @azure/msal-common v14.
|
|
1013
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1014
1014
|
/*
|
|
1015
1015
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1016
1016
|
* Licensed under the MIT License.
|
|
@@ -1107,7 +1107,7 @@
|
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
|
|
1110
|
-
/*! @azure/msal-common v14.
|
|
1110
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1111
1111
|
|
|
1112
1112
|
/*
|
|
1113
1113
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1154,7 +1154,7 @@
|
|
|
1154
1154
|
return null;
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
|
-
/*! @azure/msal-common v14.
|
|
1157
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1158
1158
|
|
|
1159
1159
|
/*
|
|
1160
1160
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1318,7 +1318,7 @@
|
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
1321
|
-
/*! @azure/msal-common v14.
|
|
1321
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1322
1322
|
|
|
1323
1323
|
/*
|
|
1324
1324
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1458,7 +1458,7 @@
|
|
|
1458
1458
|
return null;
|
|
1459
1459
|
}
|
|
1460
1460
|
|
|
1461
|
-
/*! @azure/msal-common v14.
|
|
1461
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1462
1462
|
/*
|
|
1463
1463
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1464
1464
|
* Licensed under the MIT License.
|
|
@@ -1471,7 +1471,7 @@
|
|
|
1471
1471
|
OIDC: "OIDC",
|
|
1472
1472
|
};
|
|
1473
1473
|
|
|
1474
|
-
/*! @azure/msal-common v14.
|
|
1474
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1475
1475
|
/*
|
|
1476
1476
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1477
1477
|
* Licensed under the MIT License.
|
|
@@ -1491,7 +1491,7 @@
|
|
|
1491
1491
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1492
1492
|
};
|
|
1493
1493
|
|
|
1494
|
-
/*! @azure/msal-common v14.
|
|
1494
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1495
1495
|
/*
|
|
1496
1496
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1497
1497
|
* Licensed under the MIT License.
|
|
@@ -1501,7 +1501,7 @@
|
|
|
1501
1501
|
response.hasOwnProperty("metadata"));
|
|
1502
1502
|
}
|
|
1503
1503
|
|
|
1504
|
-
/*! @azure/msal-common v14.
|
|
1504
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1505
1505
|
/*
|
|
1506
1506
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1507
1507
|
* Licensed under the MIT License.
|
|
@@ -1511,7 +1511,7 @@
|
|
|
1511
1511
|
response.hasOwnProperty("error_description"));
|
|
1512
1512
|
}
|
|
1513
1513
|
|
|
1514
|
-
/*! @azure/msal-common v14.
|
|
1514
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1515
1515
|
/*
|
|
1516
1516
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1517
1517
|
* Licensed under the MIT License.
|
|
@@ -1993,7 +1993,7 @@
|
|
|
1993
1993
|
"multiMatchedRT",
|
|
1994
1994
|
]);
|
|
1995
1995
|
|
|
1996
|
-
/*! @azure/msal-common v14.
|
|
1996
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1997
1997
|
/*
|
|
1998
1998
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1999
1999
|
* Licensed under the MIT License.
|
|
@@ -2089,7 +2089,7 @@
|
|
|
2089
2089
|
};
|
|
2090
2090
|
};
|
|
2091
2091
|
|
|
2092
|
-
/*! @azure/msal-common v14.
|
|
2092
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2093
2093
|
|
|
2094
2094
|
/*
|
|
2095
2095
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2198,7 +2198,7 @@
|
|
|
2198
2198
|
},
|
|
2199
2199
|
};
|
|
2200
2200
|
|
|
2201
|
-
/*! @azure/msal-common v14.
|
|
2201
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2202
2202
|
/*
|
|
2203
2203
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2204
2204
|
* Licensed under the MIT License.
|
|
@@ -2235,7 +2235,7 @@
|
|
|
2235
2235
|
return cachedAtSec > nowSeconds();
|
|
2236
2236
|
}
|
|
2237
2237
|
|
|
2238
|
-
/*! @azure/msal-common v14.
|
|
2238
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2239
2239
|
|
|
2240
2240
|
/*
|
|
2241
2241
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2562,7 +2562,7 @@
|
|
|
2562
2562
|
return metadata.expiresAt <= nowSeconds();
|
|
2563
2563
|
}
|
|
2564
2564
|
|
|
2565
|
-
/*! @azure/msal-common v14.
|
|
2565
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2566
2566
|
|
|
2567
2567
|
/*
|
|
2568
2568
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3401,7 +3401,7 @@
|
|
|
3401
3401
|
};
|
|
3402
3402
|
}
|
|
3403
3403
|
|
|
3404
|
-
/*! @azure/msal-common v14.
|
|
3404
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3405
3405
|
|
|
3406
3406
|
/*
|
|
3407
3407
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3432,7 +3432,7 @@
|
|
|
3432
3432
|
}
|
|
3433
3433
|
}
|
|
3434
3434
|
|
|
3435
|
-
/*! @azure/msal-common v14.
|
|
3435
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3436
3436
|
/*
|
|
3437
3437
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3438
3438
|
* Licensed under the MIT License.
|
|
@@ -3450,7 +3450,7 @@
|
|
|
3450
3450
|
}
|
|
3451
3451
|
}
|
|
3452
3452
|
|
|
3453
|
-
/*! @azure/msal-common v14.
|
|
3453
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3454
3454
|
/*
|
|
3455
3455
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3456
3456
|
* Licensed under the MIT License.
|
|
@@ -3497,7 +3497,7 @@
|
|
|
3497
3497
|
const LOGIN_HINT = "login_hint";
|
|
3498
3498
|
const DOMAIN_HINT = "domain_hint";
|
|
3499
3499
|
|
|
3500
|
-
/*! @azure/msal-common v14.
|
|
3500
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3501
3501
|
|
|
3502
3502
|
/*
|
|
3503
3503
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3513,6 +3513,12 @@
|
|
|
3513
3513
|
base64Encode: () => {
|
|
3514
3514
|
throw createClientAuthError(methodNotImplemented);
|
|
3515
3515
|
},
|
|
3516
|
+
base64UrlEncode: () => {
|
|
3517
|
+
throw createClientAuthError(methodNotImplemented);
|
|
3518
|
+
},
|
|
3519
|
+
encodeKid: () => {
|
|
3520
|
+
throw createClientAuthError(methodNotImplemented);
|
|
3521
|
+
},
|
|
3516
3522
|
async getPublicKeyThumbprint() {
|
|
3517
3523
|
throw createClientAuthError(methodNotImplemented);
|
|
3518
3524
|
},
|
|
@@ -3530,7 +3536,7 @@
|
|
|
3530
3536
|
},
|
|
3531
3537
|
};
|
|
3532
3538
|
|
|
3533
|
-
/*! @azure/msal-common v14.
|
|
3539
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3534
3540
|
|
|
3535
3541
|
/*
|
|
3536
3542
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3721,12 +3727,12 @@
|
|
|
3721
3727
|
}
|
|
3722
3728
|
}
|
|
3723
3729
|
|
|
3724
|
-
/*! @azure/msal-common v14.
|
|
3730
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3725
3731
|
/* eslint-disable header/header */
|
|
3726
3732
|
const name$1 = "@azure/msal-common";
|
|
3727
|
-
const version$1 = "14.
|
|
3733
|
+
const version$1 = "14.12.0";
|
|
3728
3734
|
|
|
3729
|
-
/*! @azure/msal-common v14.
|
|
3735
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3730
3736
|
|
|
3731
3737
|
/*
|
|
3732
3738
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3926,7 +3932,7 @@
|
|
|
3926
3932
|
}
|
|
3927
3933
|
}
|
|
3928
3934
|
|
|
3929
|
-
/*! @azure/msal-common v14.
|
|
3935
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3930
3936
|
|
|
3931
3937
|
/*
|
|
3932
3938
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3966,7 +3972,7 @@
|
|
|
3966
3972
|
};
|
|
3967
3973
|
}
|
|
3968
3974
|
|
|
3969
|
-
/*! @azure/msal-common v14.
|
|
3975
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3970
3976
|
/*
|
|
3971
3977
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3972
3978
|
* Licensed under the MIT License.
|
|
@@ -4028,7 +4034,7 @@
|
|
|
4028
4034
|
return updatedAccountInfo;
|
|
4029
4035
|
}
|
|
4030
4036
|
|
|
4031
|
-
/*! @azure/msal-common v14.
|
|
4037
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4032
4038
|
/*
|
|
4033
4039
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4034
4040
|
* Licensed under the MIT License.
|
|
@@ -4050,7 +4056,7 @@
|
|
|
4050
4056
|
return null;
|
|
4051
4057
|
}
|
|
4052
4058
|
|
|
4053
|
-
/*! @azure/msal-common v14.
|
|
4059
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4054
4060
|
|
|
4055
4061
|
/*
|
|
4056
4062
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4297,7 +4303,7 @@
|
|
|
4297
4303
|
}
|
|
4298
4304
|
}
|
|
4299
4305
|
|
|
4300
|
-
/*! @azure/msal-common v14.
|
|
4306
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4301
4307
|
/*
|
|
4302
4308
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4303
4309
|
* Licensed under the MIT License.
|
|
@@ -4305,7 +4311,7 @@
|
|
|
4305
4311
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
4306
4312
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
4307
4313
|
|
|
4308
|
-
/*! @azure/msal-common v14.
|
|
4314
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4309
4315
|
|
|
4310
4316
|
/*
|
|
4311
4317
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4332,7 +4338,7 @@
|
|
|
4332
4338
|
}
|
|
4333
4339
|
}
|
|
4334
4340
|
|
|
4335
|
-
/*! @azure/msal-common v14.
|
|
4341
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4336
4342
|
|
|
4337
4343
|
/*
|
|
4338
4344
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5471,7 +5477,7 @@
|
|
|
5471
5477
|
/**
|
|
5472
5478
|
* Returns true if the credential's keyId matches the one in the request, false otherwise
|
|
5473
5479
|
* @param entity
|
|
5474
|
-
* @param
|
|
5480
|
+
* @param keyId
|
|
5475
5481
|
*/
|
|
5476
5482
|
matchKeyId(entity, keyId) {
|
|
5477
5483
|
return !!(entity.keyId && entity.keyId === keyId);
|
|
@@ -5587,7 +5593,7 @@
|
|
|
5587
5593
|
}
|
|
5588
5594
|
}
|
|
5589
5595
|
|
|
5590
|
-
/*! @azure/msal-common v14.
|
|
5596
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5591
5597
|
|
|
5592
5598
|
/*
|
|
5593
5599
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5685,7 +5691,7 @@
|
|
|
5685
5691
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5686
5692
|
}
|
|
5687
5693
|
|
|
5688
|
-
/*! @azure/msal-common v14.
|
|
5694
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5689
5695
|
|
|
5690
5696
|
/*
|
|
5691
5697
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5703,7 +5709,7 @@
|
|
|
5703
5709
|
}
|
|
5704
5710
|
}
|
|
5705
5711
|
|
|
5706
|
-
/*! @azure/msal-common v14.
|
|
5712
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5707
5713
|
|
|
5708
5714
|
/*
|
|
5709
5715
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5801,7 +5807,7 @@
|
|
|
5801
5807
|
}
|
|
5802
5808
|
}
|
|
5803
5809
|
|
|
5804
|
-
/*! @azure/msal-common v14.
|
|
5810
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5805
5811
|
|
|
5806
5812
|
/*
|
|
5807
5813
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5838,7 +5844,7 @@
|
|
|
5838
5844
|
}
|
|
5839
5845
|
}
|
|
5840
5846
|
|
|
5841
|
-
/*! @azure/msal-common v14.
|
|
5847
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5842
5848
|
/*
|
|
5843
5849
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5844
5850
|
* Licensed under the MIT License.
|
|
@@ -5848,7 +5854,7 @@
|
|
|
5848
5854
|
UPN: "UPN",
|
|
5849
5855
|
};
|
|
5850
5856
|
|
|
5851
|
-
/*! @azure/msal-common v14.
|
|
5857
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5852
5858
|
|
|
5853
5859
|
/*
|
|
5854
5860
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5932,7 +5938,7 @@
|
|
|
5932
5938
|
}
|
|
5933
5939
|
}
|
|
5934
5940
|
|
|
5935
|
-
/*! @azure/msal-common v14.
|
|
5941
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5936
5942
|
|
|
5937
5943
|
/*
|
|
5938
5944
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6316,7 +6322,7 @@
|
|
|
6316
6322
|
}
|
|
6317
6323
|
}
|
|
6318
6324
|
|
|
6319
|
-
/*! @azure/msal-common v14.
|
|
6325
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6320
6326
|
|
|
6321
6327
|
/*
|
|
6322
6328
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6419,7 +6425,7 @@
|
|
|
6419
6425
|
}
|
|
6420
6426
|
}
|
|
6421
6427
|
|
|
6422
|
-
/*! @azure/msal-common v14.
|
|
6428
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6423
6429
|
/*
|
|
6424
6430
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6425
6431
|
* Licensed under the MIT License.
|
|
@@ -6445,7 +6451,7 @@
|
|
|
6445
6451
|
refreshTokenExpired: refreshTokenExpired
|
|
6446
6452
|
});
|
|
6447
6453
|
|
|
6448
|
-
/*! @azure/msal-common v14.
|
|
6454
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6449
6455
|
|
|
6450
6456
|
/*
|
|
6451
6457
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6533,7 +6539,7 @@
|
|
|
6533
6539
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6534
6540
|
}
|
|
6535
6541
|
|
|
6536
|
-
/*! @azure/msal-common v14.
|
|
6542
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6537
6543
|
/*
|
|
6538
6544
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6539
6545
|
* Licensed under the MIT License.
|
|
@@ -6549,7 +6555,7 @@
|
|
|
6549
6555
|
}
|
|
6550
6556
|
}
|
|
6551
6557
|
|
|
6552
|
-
/*! @azure/msal-common v14.
|
|
6558
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6553
6559
|
|
|
6554
6560
|
/*
|
|
6555
6561
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6621,7 +6627,7 @@
|
|
|
6621
6627
|
}
|
|
6622
6628
|
}
|
|
6623
6629
|
|
|
6624
|
-
/*! @azure/msal-common v14.
|
|
6630
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6625
6631
|
|
|
6626
6632
|
/*
|
|
6627
6633
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6646,11 +6652,10 @@
|
|
|
6646
6652
|
async generateCnf(request, logger) {
|
|
6647
6653
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
|
|
6648
6654
|
const reqCnf = await invokeAsync(this.generateKid.bind(this), PerformanceEvents.PopTokenGenerateCnf, logger, this.performanceClient, request.correlationId)(request);
|
|
6649
|
-
const reqCnfString = this.cryptoUtils.
|
|
6655
|
+
const reqCnfString = this.cryptoUtils.base64UrlEncode(JSON.stringify(reqCnf));
|
|
6650
6656
|
return {
|
|
6651
6657
|
kid: reqCnf.kid,
|
|
6652
6658
|
reqCnfString,
|
|
6653
|
-
reqCnfHash: await this.cryptoUtils.hashString(reqCnfString),
|
|
6654
6659
|
};
|
|
6655
6660
|
}
|
|
6656
6661
|
/**
|
|
@@ -6706,7 +6711,7 @@
|
|
|
6706
6711
|
}
|
|
6707
6712
|
}
|
|
6708
6713
|
|
|
6709
|
-
/*! @azure/msal-common v14.
|
|
6714
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6710
6715
|
/*
|
|
6711
6716
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6712
6717
|
* Licensed under the MIT License.
|
|
@@ -6733,7 +6738,7 @@
|
|
|
6733
6738
|
}
|
|
6734
6739
|
}
|
|
6735
6740
|
|
|
6736
|
-
/*! @azure/msal-common v14.
|
|
6741
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6737
6742
|
|
|
6738
6743
|
/*
|
|
6739
6744
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7001,7 +7006,13 @@
|
|
|
7001
7006
|
let refreshOn;
|
|
7002
7007
|
let familyId = Constants.EMPTY_STRING;
|
|
7003
7008
|
if (cacheRecord.accessToken) {
|
|
7004
|
-
|
|
7009
|
+
/*
|
|
7010
|
+
* if the request object has `popKid` property, `signPopToken` will be set to false and
|
|
7011
|
+
* the token will be returned unsigned
|
|
7012
|
+
*/
|
|
7013
|
+
if (cacheRecord.accessToken.tokenType ===
|
|
7014
|
+
AuthenticationScheme.POP &&
|
|
7015
|
+
!request.popKid) {
|
|
7005
7016
|
const popTokenGenerator = new PopTokenGenerator(cryptoObj);
|
|
7006
7017
|
const { secret, keyId } = cacheRecord.accessToken;
|
|
7007
7018
|
if (!keyId) {
|
|
@@ -7097,7 +7108,7 @@
|
|
|
7097
7108
|
return baseAccount;
|
|
7098
7109
|
}
|
|
7099
7110
|
|
|
7100
|
-
/*! @azure/msal-common v14.
|
|
7111
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7101
7112
|
|
|
7102
7113
|
/*
|
|
7103
7114
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7265,9 +7276,16 @@
|
|
|
7265
7276
|
parameterBuilder.addClientInfo();
|
|
7266
7277
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7267
7278
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
|
|
7268
|
-
|
|
7279
|
+
let reqCnfData;
|
|
7280
|
+
if (!request.popKid) {
|
|
7281
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
|
|
7282
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
7283
|
+
}
|
|
7284
|
+
else {
|
|
7285
|
+
reqCnfData = this.cryptoUtils.encodeKid(request.popKid);
|
|
7286
|
+
}
|
|
7269
7287
|
// SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
|
|
7270
|
-
parameterBuilder.addPopToken(reqCnfData
|
|
7288
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7271
7289
|
}
|
|
7272
7290
|
else if (request.authenticationScheme === AuthenticationScheme.SSH) {
|
|
7273
7291
|
if (request.sshJwk) {
|
|
@@ -7461,9 +7479,16 @@
|
|
|
7461
7479
|
// pass the req_cnf for POP
|
|
7462
7480
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7463
7481
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
|
|
7464
|
-
//
|
|
7465
|
-
|
|
7466
|
-
|
|
7482
|
+
// req_cnf is always sent as a string for SPAs
|
|
7483
|
+
let reqCnfData;
|
|
7484
|
+
if (!request.popKid) {
|
|
7485
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
|
|
7486
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
7487
|
+
}
|
|
7488
|
+
else {
|
|
7489
|
+
reqCnfData = this.cryptoUtils.encodeKid(request.popKid);
|
|
7490
|
+
}
|
|
7491
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7467
7492
|
}
|
|
7468
7493
|
}
|
|
7469
7494
|
return parameterBuilder.createQueryString();
|
|
@@ -7506,7 +7531,7 @@
|
|
|
7506
7531
|
}
|
|
7507
7532
|
}
|
|
7508
7533
|
|
|
7509
|
-
/*! @azure/msal-common v14.
|
|
7534
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7510
7535
|
|
|
7511
7536
|
/*
|
|
7512
7537
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7671,9 +7696,16 @@
|
|
|
7671
7696
|
}
|
|
7672
7697
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7673
7698
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
|
|
7674
|
-
|
|
7699
|
+
let reqCnfData;
|
|
7700
|
+
if (!request.popKid) {
|
|
7701
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
|
|
7702
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
7703
|
+
}
|
|
7704
|
+
else {
|
|
7705
|
+
reqCnfData = this.cryptoUtils.encodeKid(request.popKid);
|
|
7706
|
+
}
|
|
7675
7707
|
// SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
|
|
7676
|
-
parameterBuilder.addPopToken(reqCnfData
|
|
7708
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7677
7709
|
}
|
|
7678
7710
|
else if (request.authenticationScheme === AuthenticationScheme.SSH) {
|
|
7679
7711
|
if (request.sshJwk) {
|
|
@@ -7713,7 +7745,7 @@
|
|
|
7713
7745
|
}
|
|
7714
7746
|
}
|
|
7715
7747
|
|
|
7716
|
-
/*! @azure/msal-common v14.
|
|
7748
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7717
7749
|
|
|
7718
7750
|
/*
|
|
7719
7751
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7849,7 +7881,7 @@
|
|
|
7849
7881
|
}
|
|
7850
7882
|
}
|
|
7851
7883
|
|
|
7852
|
-
/*! @azure/msal-common v14.
|
|
7884
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7853
7885
|
|
|
7854
7886
|
/*
|
|
7855
7887
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7864,7 +7896,7 @@
|
|
|
7864
7896
|
},
|
|
7865
7897
|
};
|
|
7866
7898
|
|
|
7867
|
-
/*! @azure/msal-common v14.
|
|
7899
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7868
7900
|
/*
|
|
7869
7901
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7870
7902
|
* Licensed under the MIT License.
|
|
@@ -7872,7 +7904,7 @@
|
|
|
7872
7904
|
const missingKidError = "missing_kid_error";
|
|
7873
7905
|
const missingAlgError = "missing_alg_error";
|
|
7874
7906
|
|
|
7875
|
-
/*! @azure/msal-common v14.
|
|
7907
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7876
7908
|
|
|
7877
7909
|
/*
|
|
7878
7910
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7897,7 +7929,7 @@
|
|
|
7897
7929
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
7898
7930
|
}
|
|
7899
7931
|
|
|
7900
|
-
/*! @azure/msal-common v14.
|
|
7932
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7901
7933
|
|
|
7902
7934
|
/*
|
|
7903
7935
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7937,7 +7969,7 @@
|
|
|
7937
7969
|
}
|
|
7938
7970
|
}
|
|
7939
7971
|
|
|
7940
|
-
/*! @azure/msal-common v14.
|
|
7972
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7941
7973
|
|
|
7942
7974
|
/*
|
|
7943
7975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7995,7 +8027,7 @@
|
|
|
7995
8027
|
}
|
|
7996
8028
|
}
|
|
7997
8029
|
|
|
7998
|
-
/*! @azure/msal-common v14.
|
|
8030
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7999
8031
|
|
|
8000
8032
|
/*
|
|
8001
8033
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8199,7 +8231,7 @@
|
|
|
8199
8231
|
}
|
|
8200
8232
|
}
|
|
8201
8233
|
|
|
8202
|
-
/*! @azure/msal-common v14.
|
|
8234
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
8203
8235
|
|
|
8204
8236
|
/*
|
|
8205
8237
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8278,7 +8310,7 @@
|
|
|
8278
8310
|
}
|
|
8279
8311
|
}
|
|
8280
8312
|
|
|
8281
|
-
/*! @azure/msal-common v14.
|
|
8313
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
8282
8314
|
|
|
8283
8315
|
/*
|
|
8284
8316
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8917,6 +8949,7 @@
|
|
|
8917
8949
|
const uninitializedPublicClientApplication = "uninitialized_public_client_application";
|
|
8918
8950
|
const nativePromptNotSupported = "native_prompt_not_supported";
|
|
8919
8951
|
const invalidBase64String = "invalid_base64_string";
|
|
8952
|
+
const invalidPopTokenRequest = "invalid_pop_token_request";
|
|
8920
8953
|
|
|
8921
8954
|
var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
8922
8955
|
__proto__: null,
|
|
@@ -8939,6 +8972,7 @@
|
|
|
8939
8972
|
interactionInProgress: interactionInProgress,
|
|
8940
8973
|
invalidBase64String: invalidBase64String,
|
|
8941
8974
|
invalidCacheType: invalidCacheType,
|
|
8975
|
+
invalidPopTokenRequest: invalidPopTokenRequest,
|
|
8942
8976
|
monitorPopupTimeout: monitorPopupTimeout,
|
|
8943
8977
|
monitorWindowTimeout: monitorWindowTimeout,
|
|
8944
8978
|
nativeConnectionNotEstablished: nativeConnectionNotEstablished,
|
|
@@ -9021,6 +9055,7 @@
|
|
|
9021
9055
|
[uninitializedPublicClientApplication]: `You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,
|
|
9022
9056
|
[nativePromptNotSupported]: "The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
|
|
9023
9057
|
[invalidBase64String]: "Invalid base64 encoded string.",
|
|
9058
|
+
[invalidPopTokenRequest]: "Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",
|
|
9024
9059
|
};
|
|
9025
9060
|
/**
|
|
9026
9061
|
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
|
|
@@ -9211,6 +9246,10 @@
|
|
|
9211
9246
|
code: invalidBase64String,
|
|
9212
9247
|
desc: BrowserAuthErrorMessages[invalidBase64String],
|
|
9213
9248
|
},
|
|
9249
|
+
invalidPopTokenRequest: {
|
|
9250
|
+
code: invalidPopTokenRequest,
|
|
9251
|
+
desc: BrowserAuthErrorMessages[invalidPopTokenRequest],
|
|
9252
|
+
},
|
|
9214
9253
|
};
|
|
9215
9254
|
/**
|
|
9216
9255
|
* Browser library error class thrown by the MSAL.js library for SPAs
|
|
@@ -10142,7 +10181,7 @@
|
|
|
10142
10181
|
|
|
10143
10182
|
/* eslint-disable header/header */
|
|
10144
10183
|
const name = "@azure/msal-browser";
|
|
10145
|
-
const version = "3.
|
|
10184
|
+
const version = "3.17.0";
|
|
10146
10185
|
|
|
10147
10186
|
/*
|
|
10148
10187
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10958,6 +10997,21 @@
|
|
|
10958
10997
|
base64Decode(input) {
|
|
10959
10998
|
return base64Decode(input);
|
|
10960
10999
|
}
|
|
11000
|
+
/**
|
|
11001
|
+
* Encodes input string to base64 URL safe string.
|
|
11002
|
+
* @param input
|
|
11003
|
+
*/
|
|
11004
|
+
base64UrlEncode(input) {
|
|
11005
|
+
return urlEncode(input);
|
|
11006
|
+
}
|
|
11007
|
+
/**
|
|
11008
|
+
* Stringifies and base64Url encodes input public key
|
|
11009
|
+
* @param inputKid
|
|
11010
|
+
* @returns Base64Url encoded public key
|
|
11011
|
+
*/
|
|
11012
|
+
encodeKid(inputKid) {
|
|
11013
|
+
return this.base64UrlEncode(JSON.stringify({ kid: inputKid }));
|
|
11014
|
+
}
|
|
10961
11015
|
/**
|
|
10962
11016
|
* Generates a keypair, stores it and returns a thumbprint
|
|
10963
11017
|
* @param request
|
|
@@ -13298,10 +13352,11 @@
|
|
|
13298
13352
|
// continue with a native call for any and all errors
|
|
13299
13353
|
this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
|
|
13300
13354
|
}
|
|
13355
|
+
const { ...nativeTokenRequest } = nativeRequest;
|
|
13301
13356
|
// fall back to native calls
|
|
13302
13357
|
const messageBody = {
|
|
13303
13358
|
method: NativeExtensionMethod.GetToken,
|
|
13304
|
-
request:
|
|
13359
|
+
request: nativeTokenRequest,
|
|
13305
13360
|
};
|
|
13306
13361
|
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
13307
13362
|
const validatedResponse = this.validateNativeResponse(response);
|
|
@@ -13383,9 +13438,10 @@
|
|
|
13383
13438
|
async acquireTokenRedirect(request, rootMeasurement) {
|
|
13384
13439
|
this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");
|
|
13385
13440
|
const nativeRequest = await this.initializeNativeRequest(request);
|
|
13441
|
+
const { ...nativeTokenRequest } = nativeRequest;
|
|
13386
13442
|
const messageBody = {
|
|
13387
13443
|
method: NativeExtensionMethod.GetToken,
|
|
13388
|
-
request:
|
|
13444
|
+
request: nativeTokenRequest,
|
|
13389
13445
|
};
|
|
13390
13446
|
try {
|
|
13391
13447
|
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
@@ -13488,7 +13544,7 @@
|
|
|
13488
13544
|
const result = await this.generateAuthenticationResult(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
|
|
13489
13545
|
// cache accounts and tokens in the appropriate storage
|
|
13490
13546
|
this.cacheAccount(baseAccount);
|
|
13491
|
-
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims,
|
|
13547
|
+
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, response.access_token, result.tenantId, reqTimestamp);
|
|
13492
13548
|
return result;
|
|
13493
13549
|
}
|
|
13494
13550
|
/**
|
|
@@ -13519,7 +13575,8 @@
|
|
|
13519
13575
|
* @param response
|
|
13520
13576
|
*/
|
|
13521
13577
|
async generatePopAccessToken(response, request) {
|
|
13522
|
-
if (request.tokenType === AuthenticationScheme.POP
|
|
13578
|
+
if (request.tokenType === AuthenticationScheme.POP &&
|
|
13579
|
+
request.signPopToken) {
|
|
13523
13580
|
/**
|
|
13524
13581
|
* This code prioritizes SHR returned from the native layer. In case of error/SHR not calculated from WAM and the AT
|
|
13525
13582
|
* is still received, SHR is calculated locally
|
|
@@ -13639,7 +13696,7 @@
|
|
|
13639
13696
|
: response.expires_in) || 0;
|
|
13640
13697
|
const tokenExpirationSeconds = reqTimestamp + expiresIn;
|
|
13641
13698
|
const responseScopes = this.generateScopes(response, request);
|
|
13642
|
-
const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode);
|
|
13699
|
+
const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode, undefined, request.tokenType, undefined, request.keyId);
|
|
13643
13700
|
const nativeCacheRecord = new CacheRecord(undefined, cachedIdToken, cachedAccessToken);
|
|
13644
13701
|
void this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, request.storeInCache);
|
|
13645
13702
|
}
|
|
@@ -13769,8 +13826,13 @@
|
|
|
13769
13826
|
...request.extraQueryParameters,
|
|
13770
13827
|
...request.tokenQueryParameters,
|
|
13771
13828
|
},
|
|
13772
|
-
extendedExpiryToken: false,
|
|
13829
|
+
extendedExpiryToken: false,
|
|
13830
|
+
keyId: request.popKid,
|
|
13773
13831
|
};
|
|
13832
|
+
// Check for PoP token requests: signPopToken should only be set to true if popKid is not set
|
|
13833
|
+
if (validatedRequest.signPopToken && !!request.popKid) {
|
|
13834
|
+
throw createBrowserAuthError(invalidPopTokenRequest);
|
|
13835
|
+
}
|
|
13774
13836
|
this.handleExtraBrokerParams(validatedRequest);
|
|
13775
13837
|
validatedRequest.extraParameters =
|
|
13776
13838
|
validatedRequest.extraParameters || {};
|
|
@@ -13785,10 +13847,20 @@
|
|
|
13785
13847
|
shrNonce: request.shrNonce,
|
|
13786
13848
|
};
|
|
13787
13849
|
const popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
validatedRequest.
|
|
13791
|
-
|
|
13850
|
+
// generate reqCnf if not provided in the request
|
|
13851
|
+
let reqCnfData;
|
|
13852
|
+
if (!validatedRequest.keyId) {
|
|
13853
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(shrParameters, this.logger);
|
|
13854
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
13855
|
+
validatedRequest.keyId = generatedReqCnfData.kid;
|
|
13856
|
+
validatedRequest.signPopToken = true;
|
|
13857
|
+
}
|
|
13858
|
+
else {
|
|
13859
|
+
reqCnfData = this.browserCrypto.base64UrlEncode(JSON.stringify({ kid: validatedRequest.keyId }));
|
|
13860
|
+
validatedRequest.signPopToken = false;
|
|
13861
|
+
}
|
|
13862
|
+
// SPAs require whole string to be passed to broker
|
|
13863
|
+
validatedRequest.reqCnf = reqCnfData;
|
|
13792
13864
|
}
|
|
13793
13865
|
return validatedRequest;
|
|
13794
13866
|
}
|