@azure/msal-common 14.0.3 → 14.1.0-alpha.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.
Files changed (296) hide show
  1. package/dist/account/AccountInfo.d.ts +32 -32
  2. package/dist/account/AuthToken.d.ts +17 -17
  3. package/dist/account/AuthToken.d.ts.map +1 -1
  4. package/dist/account/AuthToken.mjs +60 -59
  5. package/dist/account/AuthToken.mjs.map +1 -1
  6. package/dist/account/CcsCredential.d.ts +9 -9
  7. package/dist/account/CcsCredential.mjs +8 -8
  8. package/dist/account/ClientCredentials.d.ts +14 -14
  9. package/dist/account/ClientInfo.d.ts +19 -19
  10. package/dist/account/ClientInfo.d.ts.map +1 -1
  11. package/dist/account/ClientInfo.mjs +39 -38
  12. package/dist/account/ClientInfo.mjs.map +1 -1
  13. package/dist/account/TokenClaims.d.ts +65 -65
  14. package/dist/authority/Authority.d.ts +235 -235
  15. package/dist/authority/Authority.d.ts.map +1 -1
  16. package/dist/authority/Authority.mjs +743 -765
  17. package/dist/authority/Authority.mjs.map +1 -1
  18. package/dist/authority/AuthorityFactory.d.ts +31 -31
  19. package/dist/authority/AuthorityFactory.d.ts.map +1 -1
  20. package/dist/authority/AuthorityFactory.mjs +52 -50
  21. package/dist/authority/AuthorityFactory.mjs.map +1 -1
  22. package/dist/authority/AuthorityMetadata.d.ts +623 -623
  23. package/dist/authority/AuthorityMetadata.mjs +884 -884
  24. package/dist/authority/AuthorityOptions.d.ts +21 -21
  25. package/dist/authority/AuthorityOptions.mjs +18 -18
  26. package/dist/authority/AuthorityType.d.ts +10 -10
  27. package/dist/authority/AuthorityType.mjs +13 -13
  28. package/dist/authority/AzureRegion.d.ts +1 -1
  29. package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
  30. package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
  31. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
  32. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +8 -8
  33. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
  34. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +8 -8
  35. package/dist/authority/ImdsOptions.d.ts +5 -5
  36. package/dist/authority/OIDCOptions.d.ts +8 -8
  37. package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
  38. package/dist/authority/OpenIdConfigResponse.mjs +10 -10
  39. package/dist/authority/ProtocolMode.d.ts +8 -8
  40. package/dist/authority/ProtocolMode.mjs +11 -11
  41. package/dist/authority/RegionDiscovery.d.ts +32 -30
  42. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  43. package/dist/authority/RegionDiscovery.mjs +107 -108
  44. package/dist/authority/RegionDiscovery.mjs.map +1 -1
  45. package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
  46. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
  47. package/dist/cache/CacheManager.d.ts +446 -446
  48. package/dist/cache/CacheManager.d.ts.map +1 -1
  49. package/dist/cache/CacheManager.mjs +1000 -1024
  50. package/dist/cache/CacheManager.mjs.map +1 -1
  51. package/dist/cache/entities/AccessTokenEntity.d.ts +56 -56
  52. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
  53. package/dist/cache/entities/AccessTokenEntity.mjs +111 -110
  54. package/dist/cache/entities/AccessTokenEntity.mjs.map +1 -1
  55. package/dist/cache/entities/AccountEntity.d.ts +101 -101
  56. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  57. package/dist/cache/entities/AccountEntity.mjs +222 -221
  58. package/dist/cache/entities/AccountEntity.mjs.map +1 -1
  59. package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
  60. package/dist/cache/entities/AppMetadataEntity.mjs +66 -66
  61. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +48 -48
  62. package/dist/cache/entities/AuthorityMetadataEntity.mjs +78 -78
  63. package/dist/cache/entities/CacheRecord.d.ts +14 -14
  64. package/dist/cache/entities/CacheRecord.mjs +14 -14
  65. package/dist/cache/entities/CredentialEntity.d.ts +88 -88
  66. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  67. package/dist/cache/entities/CredentialEntity.mjs +138 -137
  68. package/dist/cache/entities/CredentialEntity.mjs.map +1 -1
  69. package/dist/cache/entities/IdTokenEntity.d.ts +34 -34
  70. package/dist/cache/entities/IdTokenEntity.mjs +56 -56
  71. package/dist/cache/entities/RefreshTokenEntity.d.ts +36 -36
  72. package/dist/cache/entities/RefreshTokenEntity.mjs +59 -59
  73. package/dist/cache/entities/ServerTelemetryEntity.d.ts +12 -12
  74. package/dist/cache/entities/ServerTelemetryEntity.mjs +27 -27
  75. package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
  76. package/dist/cache/entities/ThrottlingEntity.mjs +23 -23
  77. package/dist/cache/interface/ICacheManager.d.ts +166 -166
  78. package/dist/cache/interface/ICachePlugin.d.ts +5 -5
  79. package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
  80. package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
  81. package/dist/cache/persistence/TokenCacheContext.mjs +25 -25
  82. package/dist/cache/utils/CacheTypes.d.ts +69 -69
  83. package/dist/client/AuthorizationCodeClient.d.ts +73 -73
  84. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  85. package/dist/client/AuthorizationCodeClient.mjs +411 -410
  86. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  87. package/dist/client/BaseClient.d.ts +51 -51
  88. package/dist/client/BaseClient.d.ts.map +1 -1
  89. package/dist/client/BaseClient.mjs +100 -99
  90. package/dist/client/BaseClient.mjs.map +1 -1
  91. package/dist/client/RefreshTokenClient.d.ts +35 -35
  92. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  93. package/dist/client/RefreshTokenClient.mjs +185 -234
  94. package/dist/client/RefreshTokenClient.mjs.map +1 -1
  95. package/dist/client/SilentFlowClient.d.ts +26 -25
  96. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  97. package/dist/client/SilentFlowClient.mjs +127 -103
  98. package/dist/client/SilentFlowClient.mjs.map +1 -1
  99. package/dist/config/AppTokenProvider.d.ts +38 -38
  100. package/dist/config/ClientConfiguration.d.ts +150 -150
  101. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  102. package/dist/config/ClientConfiguration.mjs +99 -100
  103. package/dist/config/ClientConfiguration.mjs.map +1 -1
  104. package/dist/crypto/ICrypto.d.ts +62 -62
  105. package/dist/crypto/ICrypto.d.ts.map +1 -1
  106. package/dist/crypto/ICrypto.mjs +35 -43
  107. package/dist/crypto/ICrypto.mjs.map +1 -1
  108. package/dist/crypto/IGuidGenerator.d.ts +4 -4
  109. package/dist/crypto/JoseHeader.d.ts +22 -22
  110. package/dist/crypto/JoseHeader.d.ts.map +1 -1
  111. package/dist/crypto/JoseHeader.mjs +39 -38
  112. package/dist/crypto/JoseHeader.mjs.map +1 -1
  113. package/dist/crypto/PopTokenGenerator.d.ts +60 -59
  114. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  115. package/dist/crypto/PopTokenGenerator.mjs +83 -83
  116. package/dist/crypto/PopTokenGenerator.mjs.map +1 -1
  117. package/dist/crypto/SignedHttpRequest.d.ts +11 -11
  118. package/dist/error/AuthError.d.ts +44 -47
  119. package/dist/error/AuthError.d.ts.map +1 -1
  120. package/dist/error/AuthError.mjs +50 -52
  121. package/dist/error/AuthError.mjs.map +1 -1
  122. package/dist/error/AuthErrorCodes.d.ts +6 -0
  123. package/dist/error/AuthErrorCodes.d.ts.map +1 -0
  124. package/dist/error/AuthErrorCodes.mjs +14 -0
  125. package/dist/error/AuthErrorCodes.mjs.map +1 -0
  126. package/dist/error/ClientAuthError.d.ts +232 -412
  127. package/dist/error/ClientAuthError.d.ts.map +1 -1
  128. package/dist/error/ClientAuthError.mjs +248 -520
  129. package/dist/error/ClientAuthError.mjs.map +1 -1
  130. package/dist/error/ClientAuthErrorCodes.d.ts +44 -0
  131. package/dist/error/ClientAuthErrorCodes.d.ts.map +1 -0
  132. package/dist/error/ClientAuthErrorCodes.mjs +52 -0
  133. package/dist/error/ClientAuthErrorCodes.mjs.map +1 -0
  134. package/dist/error/ClientConfigurationError.d.ts +128 -222
  135. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  136. package/dist/error/ClientConfigurationError.mjs +140 -281
  137. package/dist/error/ClientConfigurationError.mjs.map +1 -1
  138. package/dist/error/ClientConfigurationErrorCodes.d.ts +23 -0
  139. package/dist/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
  140. package/dist/error/ClientConfigurationErrorCodes.mjs +31 -0
  141. package/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -0
  142. package/dist/error/InteractionRequiredAuthError.d.ts +57 -59
  143. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  144. package/dist/error/InteractionRequiredAuthError.mjs +80 -79
  145. package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
  146. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts +6 -0
  147. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
  148. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +16 -0
  149. package/dist/error/InteractionRequiredAuthErrorCodes.mjs.map +1 -0
  150. package/dist/error/JoseHeaderError.d.ts +15 -28
  151. package/dist/error/JoseHeaderError.d.ts.map +1 -1
  152. package/dist/error/JoseHeaderError.mjs +24 -40
  153. package/dist/error/JoseHeaderError.mjs.map +1 -1
  154. package/dist/error/JoseHeaderErrorCodes.d.ts +3 -0
  155. package/dist/error/JoseHeaderErrorCodes.d.ts.map +1 -0
  156. package/dist/error/JoseHeaderErrorCodes.mjs +11 -0
  157. package/dist/error/JoseHeaderErrorCodes.mjs.map +1 -0
  158. package/dist/error/ServerError.d.ts +7 -7
  159. package/dist/error/ServerError.mjs +14 -14
  160. package/dist/index.cjs +8715 -9047
  161. package/dist/index.cjs.map +1 -1
  162. package/dist/index.d.ts +96 -96
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/index.mjs +13 -5
  165. package/dist/index.mjs.map +1 -1
  166. package/dist/logger/Logger.d.ts +95 -95
  167. package/dist/logger/Logger.mjs +188 -188
  168. package/dist/network/INetworkModule.d.ts +29 -29
  169. package/dist/network/INetworkModule.d.ts.map +1 -1
  170. package/dist/network/INetworkModule.mjs +14 -15
  171. package/dist/network/INetworkModule.mjs.map +1 -1
  172. package/dist/network/NetworkManager.d.ts +33 -33
  173. package/dist/network/NetworkManager.d.ts.map +1 -1
  174. package/dist/network/NetworkManager.mjs +36 -35
  175. package/dist/network/NetworkManager.mjs.map +1 -1
  176. package/dist/network/RequestThumbprint.d.ts +16 -16
  177. package/dist/network/ThrottlingUtils.d.ts +42 -42
  178. package/dist/network/ThrottlingUtils.mjs +95 -95
  179. package/dist/packageMetadata.d.ts +2 -2
  180. package/dist/packageMetadata.mjs +3 -3
  181. package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
  182. package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -1
  183. package/dist/request/AuthenticationHeaderParser.mjs +58 -57
  184. package/dist/request/AuthenticationHeaderParser.mjs.map +1 -1
  185. package/dist/request/BaseAuthRequest.d.ts +40 -40
  186. package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
  187. package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
  188. package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
  189. package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
  190. package/dist/request/CommonEndSessionRequest.d.ts +21 -21
  191. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
  192. package/dist/request/CommonRefreshTokenRequest.d.ts +19 -19
  193. package/dist/request/CommonSilentFlowRequest.d.ts +18 -18
  194. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
  195. package/dist/request/NativeRequest.d.ts +19 -19
  196. package/dist/request/NativeSignOutRequest.d.ts +5 -5
  197. package/dist/request/RequestParameterBuilder.d.ts +217 -217
  198. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  199. package/dist/request/RequestParameterBuilder.mjs +383 -382
  200. package/dist/request/RequestParameterBuilder.mjs.map +1 -1
  201. package/dist/request/RequestValidator.d.ts +33 -33
  202. package/dist/request/RequestValidator.d.ts.map +1 -1
  203. package/dist/request/RequestValidator.mjs +83 -82
  204. package/dist/request/RequestValidator.mjs.map +1 -1
  205. package/dist/request/ScopeSet.d.ts +88 -88
  206. package/dist/request/ScopeSet.d.ts.map +1 -1
  207. package/dist/request/ScopeSet.mjs +201 -199
  208. package/dist/request/ScopeSet.mjs.map +1 -1
  209. package/dist/request/StoreInCache.d.ts +8 -8
  210. package/dist/response/AuthenticationResult.d.ts +41 -41
  211. package/dist/response/AuthorizationCodePayload.d.ts +13 -13
  212. package/dist/response/DeviceCodeResponse.d.ts +25 -25
  213. package/dist/response/ExternalTokenResponse.d.ts +15 -15
  214. package/dist/response/IMDSBadResponse.d.ts +4 -4
  215. package/dist/response/ResponseHandler.d.ts +67 -67
  216. package/dist/response/ResponseHandler.d.ts.map +1 -1
  217. package/dist/response/ResponseHandler.mjs +314 -313
  218. package/dist/response/ResponseHandler.mjs.map +1 -1
  219. package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
  220. package/dist/response/ServerAuthorizationTokenResponse.d.ts +46 -46
  221. package/dist/telemetry/performance/IPerformanceClient.d.ts +51 -51
  222. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
  223. package/dist/telemetry/performance/PerformanceClient.d.ts +191 -191
  224. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  225. package/dist/telemetry/performance/PerformanceClient.mjs +409 -408
  226. package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
  227. package/dist/telemetry/performance/PerformanceEvent.d.ts +433 -433
  228. package/dist/telemetry/performance/PerformanceEvent.mjs +234 -234
  229. package/dist/telemetry/performance/StubPerformanceClient.d.ts +24 -24
  230. package/dist/telemetry/performance/StubPerformanceClient.mjs +76 -76
  231. package/dist/telemetry/server/ServerTelemetryManager.d.ts +66 -66
  232. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  233. package/dist/telemetry/server/ServerTelemetryManager.mjs +197 -197
  234. package/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
  235. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
  236. package/dist/url/IUri.d.ts +12 -12
  237. package/dist/url/UrlString.d.ts +83 -83
  238. package/dist/url/UrlString.d.ts.map +1 -1
  239. package/dist/url/UrlString.mjs +283 -281
  240. package/dist/url/UrlString.mjs.map +1 -1
  241. package/dist/utils/Constants.d.ts +366 -363
  242. package/dist/utils/Constants.d.ts.map +1 -1
  243. package/dist/utils/Constants.mjs +376 -368
  244. package/dist/utils/Constants.mjs.map +1 -1
  245. package/dist/utils/FunctionWrappers.d.ts +27 -27
  246. package/dist/utils/FunctionWrappers.mjs +85 -85
  247. package/dist/utils/MsalTypes.d.ts +6 -6
  248. package/dist/utils/ProtocolUtils.d.ts +42 -42
  249. package/dist/utils/ProtocolUtils.d.ts.map +1 -1
  250. package/dist/utils/ProtocolUtils.mjs +71 -70
  251. package/dist/utils/ProtocolUtils.mjs.map +1 -1
  252. package/dist/utils/StringUtils.d.ts +40 -40
  253. package/dist/utils/StringUtils.mjs +95 -95
  254. package/dist/utils/TimeUtils.d.ts +27 -27
  255. package/dist/utils/TimeUtils.mjs +45 -45
  256. package/package.json +1 -1
  257. package/src/account/AuthToken.ts +8 -7
  258. package/src/account/ClientInfo.ts +9 -6
  259. package/src/authority/Authority.ts +76 -94
  260. package/src/authority/AuthorityFactory.ts +21 -9
  261. package/src/authority/RegionDiscovery.ts +21 -18
  262. package/src/cache/CacheManager.ts +37 -77
  263. package/src/cache/entities/AccessTokenEntity.ts +7 -2
  264. package/src/cache/entities/AccountEntity.ts +7 -2
  265. package/src/cache/entities/CredentialEntity.ts +7 -2
  266. package/src/client/AuthorizationCodeClient.ts +32 -10
  267. package/src/client/BaseClient.ts +7 -4
  268. package/src/client/RefreshTokenClient.ts +81 -124
  269. package/src/client/SilentFlowClient.ts +72 -19
  270. package/src/config/ClientConfiguration.ts +6 -7
  271. package/src/crypto/ICrypto.ts +13 -28
  272. package/src/crypto/JoseHeader.ts +6 -3
  273. package/src/crypto/PopTokenGenerator.ts +10 -5
  274. package/src/error/AuthError.ts +24 -26
  275. package/src/error/AuthErrorCodes.ts +10 -0
  276. package/src/error/ClientAuthError.ts +227 -632
  277. package/src/error/ClientAuthErrorCodes.ts +51 -0
  278. package/src/error/ClientConfigurationError.ts +146 -332
  279. package/src/error/ClientConfigurationErrorCodes.ts +28 -0
  280. package/src/error/InteractionRequiredAuthError.ts +60 -55
  281. package/src/error/InteractionRequiredAuthErrorCodes.ts +13 -0
  282. package/src/error/JoseHeaderError.ts +11 -31
  283. package/src/error/JoseHeaderErrorCodes.ts +7 -0
  284. package/src/index.ts +12 -1
  285. package/src/network/INetworkModule.ts +10 -7
  286. package/src/network/NetworkManager.ts +5 -5
  287. package/src/request/AuthenticationHeaderParser.ts +11 -8
  288. package/src/request/RequestParameterBuilder.ts +10 -3
  289. package/src/request/RequestValidator.ts +19 -6
  290. package/src/request/ScopeSet.ts +23 -7
  291. package/src/response/ResponseHandler.ts +37 -17
  292. package/src/telemetry/performance/PerformanceClient.ts +2 -1
  293. package/src/telemetry/server/ServerTelemetryManager.ts +1 -1
  294. package/src/url/UrlString.ts +26 -16
  295. package/src/utils/Constants.ts +11 -3
  296. package/src/utils/ProtocolUtils.ts +8 -12
@@ -1 +1 @@
1
- {"version":3,"file":"ClientConfiguration.d.ts","sourceRoot":"","sources":["../../src/config/ClientConfiguration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAiC,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAU,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGrE,OAAO,EAAE,SAAS,EAAE,M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AAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,WAAW,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,aAAa,CAG1D,CAAC;AAgDF;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,WAAW,EAAE,eAAe,EAC5B,aAAa,EAAE,iBAAiB,EAChC,aAAa,EAAE,gBAAgB,EAC/B,YAAY,EAAE,gBAAgB,EAC9B,gBAAgB,EAAE,qBAAqB,EACvC,gBAAgB,EAAE,qBAAqB,EACvC,eAAe,EAAE,oBAAoB,EACrC,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,sBAAsB,EAC9C,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,GACvC,EAAE,mBAAmB,GAAG,yBAAyB,CA4BjD;AAeD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAIvE"}
@@ -1,112 +1,111 @@
1
- /*! @azure/msal-common v14.0.3 2023-09-05 */
1
+ /*! @azure/msal-common v14.1.0-alpha.0 2023-09-20 */
2
2
  'use strict';
3
3
  import { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.mjs';
4
- import { AuthError } from '../error/AuthError.mjs';
5
4
  import { Logger, LogLevel } from '../logger/Logger.mjs';
6
5
  import { Constants } from '../utils/Constants.mjs';
7
6
  import { version } from '../packageMetadata.mjs';
8
7
  import { AzureCloudInstance } from '../authority/AuthorityOptions.mjs';
9
8
  import { DefaultStorageClass } from '../cache/CacheManager.mjs';
10
9
  import { ProtocolMode } from '../authority/ProtocolMode.mjs';
10
+ import { createClientAuthError } from '../error/ClientAuthError.mjs';
11
+ import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';
11
12
 
12
- /*
13
- * Copyright (c) Microsoft Corporation. All rights reserved.
14
- * Licensed under the MIT License.
15
- */
16
- // Token renewal offset default in seconds
17
- const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
18
- const DEFAULT_SYSTEM_OPTIONS = {
19
- tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
20
- preventCorsPreflight: false,
21
- };
22
- const DEFAULT_LOGGER_IMPLEMENTATION = {
23
- loggerCallback: () => {
24
- // allow users to not set loggerCallback
25
- },
26
- piiLoggingEnabled: false,
27
- logLevel: LogLevel.Info,
28
- correlationId: Constants.EMPTY_STRING,
29
- };
30
- const DEFAULT_CACHE_OPTIONS = {
31
- claimsBasedCachingEnabled: false,
32
- };
33
- const DEFAULT_NETWORK_IMPLEMENTATION = {
34
- async sendGetRequestAsync() {
35
- const notImplErr = "Network interface - sendGetRequestAsync() has not been implemented";
36
- throw AuthError.createUnexpectedError(notImplErr);
37
- },
38
- async sendPostRequestAsync() {
39
- const notImplErr = "Network interface - sendPostRequestAsync() has not been implemented";
40
- throw AuthError.createUnexpectedError(notImplErr);
41
- },
42
- };
43
- const DEFAULT_LIBRARY_INFO = {
44
- sku: Constants.SKU,
45
- version: version,
46
- cpu: Constants.EMPTY_STRING,
47
- os: Constants.EMPTY_STRING,
48
- };
49
- const DEFAULT_CLIENT_CREDENTIALS = {
50
- clientSecret: Constants.EMPTY_STRING,
51
- clientAssertion: undefined,
52
- };
53
- const DEFAULT_AZURE_CLOUD_OPTIONS = {
54
- azureCloudInstance: AzureCloudInstance.None,
55
- tenant: `${Constants.DEFAULT_COMMON_TENANT}`,
56
- };
57
- const DEFAULT_TELEMETRY_OPTIONS = {
58
- application: {
59
- appName: "",
60
- appVersion: "",
61
- },
62
- };
63
- /**
64
- * Function that sets the default options when not explicitly configured from app developer
65
- *
66
- * @param Configuration
67
- *
68
- * @returns Configuration
69
- */
70
- function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
71
- const loggerOptions = {
72
- ...DEFAULT_LOGGER_IMPLEMENTATION,
73
- ...userLoggerOption,
74
- };
75
- return {
76
- authOptions: buildAuthOptions(userAuthOptions),
77
- systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },
78
- loggerOptions: loggerOptions,
79
- cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions },
80
- storageInterface: storageImplementation ||
81
- new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)),
82
- networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
83
- cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
84
- clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
85
- libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
86
- telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
87
- serverTelemetryManager: serverTelemetryManager || null,
88
- persistencePlugin: persistencePlugin || null,
89
- serializableCache: serializableCache || null,
90
- };
91
- }
92
- /**
93
- * Construct authoptions from the client and platform passed values
94
- * @param authOptions
95
- */
96
- function buildAuthOptions(authOptions) {
97
- return {
98
- clientCapabilities: [],
99
- azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
100
- skipAuthorityMetadataCache: false,
101
- ...authOptions,
102
- };
103
- }
104
- /**
105
- * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise
106
- * @param ClientConfiguration
107
- */
108
- function isOidcProtocolMode(config) {
109
- return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
13
+ /*
14
+ * Copyright (c) Microsoft Corporation. All rights reserved.
15
+ * Licensed under the MIT License.
16
+ */
17
+ // Token renewal offset default in seconds
18
+ const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
19
+ const DEFAULT_SYSTEM_OPTIONS = {
20
+ tokenRenewalOffsetSeconds: DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
21
+ preventCorsPreflight: false,
22
+ };
23
+ const DEFAULT_LOGGER_IMPLEMENTATION = {
24
+ loggerCallback: () => {
25
+ // allow users to not set loggerCallback
26
+ },
27
+ piiLoggingEnabled: false,
28
+ logLevel: LogLevel.Info,
29
+ correlationId: Constants.EMPTY_STRING,
30
+ };
31
+ const DEFAULT_CACHE_OPTIONS = {
32
+ claimsBasedCachingEnabled: false,
33
+ };
34
+ const DEFAULT_NETWORK_IMPLEMENTATION = {
35
+ async sendGetRequestAsync() {
36
+ throw createClientAuthError(methodNotImplemented);
37
+ },
38
+ async sendPostRequestAsync() {
39
+ throw createClientAuthError(methodNotImplemented);
40
+ },
41
+ };
42
+ const DEFAULT_LIBRARY_INFO = {
43
+ sku: Constants.SKU,
44
+ version: version,
45
+ cpu: Constants.EMPTY_STRING,
46
+ os: Constants.EMPTY_STRING,
47
+ };
48
+ const DEFAULT_CLIENT_CREDENTIALS = {
49
+ clientSecret: Constants.EMPTY_STRING,
50
+ clientAssertion: undefined,
51
+ };
52
+ const DEFAULT_AZURE_CLOUD_OPTIONS = {
53
+ azureCloudInstance: AzureCloudInstance.None,
54
+ tenant: `${Constants.DEFAULT_COMMON_TENANT}`,
55
+ };
56
+ const DEFAULT_TELEMETRY_OPTIONS = {
57
+ application: {
58
+ appName: "",
59
+ appVersion: "",
60
+ },
61
+ };
62
+ /**
63
+ * Function that sets the default options when not explicitly configured from app developer
64
+ *
65
+ * @param Configuration
66
+ *
67
+ * @returns Configuration
68
+ */
69
+ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, cacheOptions: userCacheOptions, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
70
+ const loggerOptions = {
71
+ ...DEFAULT_LOGGER_IMPLEMENTATION,
72
+ ...userLoggerOption,
73
+ };
74
+ return {
75
+ authOptions: buildAuthOptions(userAuthOptions),
76
+ systemOptions: { ...DEFAULT_SYSTEM_OPTIONS, ...userSystemOptions },
77
+ loggerOptions: loggerOptions,
78
+ cacheOptions: { ...DEFAULT_CACHE_OPTIONS, ...userCacheOptions },
79
+ storageInterface: storageImplementation ||
80
+ new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions)),
81
+ networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
82
+ cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
83
+ clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
84
+ libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
85
+ telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
86
+ serverTelemetryManager: serverTelemetryManager || null,
87
+ persistencePlugin: persistencePlugin || null,
88
+ serializableCache: serializableCache || null,
89
+ };
90
+ }
91
+ /**
92
+ * Construct authoptions from the client and platform passed values
93
+ * @param authOptions
94
+ */
95
+ function buildAuthOptions(authOptions) {
96
+ return {
97
+ clientCapabilities: [],
98
+ azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
99
+ skipAuthorityMetadataCache: false,
100
+ ...authOptions,
101
+ };
102
+ }
103
+ /**
104
+ * Returns true if config has protocolMode set to ProtocolMode.OIDC, false otherwise
105
+ * @param ClientConfiguration
106
+ */
107
+ function isOidcProtocolMode(config) {
108
+ return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
110
109
  }
111
110
 
112
111
  export { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration, isOidcProtocolMode };
@@ -1 +1 @@
1
- {"version":3,"file":"ClientConfiguration.mjs","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAKA;AACA;AAEA;AAGA;;;;;;;;;;;;;AA0BG,IAAA,aAAA,EAAA,SAAA,CAAA,YAAA;AACH,CAAM,CAAA;MACS,wBAAc;IACzB,yBAAgB,EAAA,KAAc;;MAElB,8BAAgB,GAAA;IAC5B,MAAgB,mBAAG,GAAA;QACH,MAAA,UAAG,GAAA,oEAAe,CAAA;QACnB,MAAA,SAAG,CAAA,qBAAQ,CAAA,UAAA,CAAA,CAAA;KACT;IACjB,MAAW,oBAAe,GAAA;QACjB,MAAC,UAAE,GAAA,qEAAiB,CAAA;AAC7B,QAAA,MAAA,SAAA,CAAA,qBAA+C,CAAA,YAAO;AACtD,KAAA;AACA,CAAA,CAAA;MACF,oBAAA,GAAA;AAEF,IAAM,GAAA,EAAA;AACF,IAAA,OAAA,EAAA,OAAa;AACb,IAAA,GAAA,EAAA,SAAe,CAAA,YAAS;AACxB,IAAA,EAAA,EAAA,SAAa,CAAE,YAAS;AACxB,CAAA,CAAA;MACgB,6BAAe;IAC/B,YAAgB,EAAA,sBAAiB;AACjC,IAAA,eAAe,EAAE,SAAS;;AAE1B,MAAA,2BAAoB,GAAA;AACpB,IAAA,kBAAA,EAAA,kBAAwB,CAAA,IAAA;IACxB,MAAiB,EAAA,CAAA,EAAA,+BAAoB,CAAA,CAAA;AACrC,CAAA,CAAA;AACA,MAAA,yBAAmB,GAAA;IACrB,WAAA,EAAA;AAEF,QAAA,OAAA,EAAA,EAAA;;;;;;;;;;;AAWG,SAAA,wBAAA,CAAA,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":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;;;;;;;;AAKA;AACA;AACA;AAGA;;;;;;;;;;;;;AA8BG,IAAA,aAAA,EAAA,SAAA,CAAA,YAAA;AACH,CAAM,CAAA;MACS,wBAAc;IACzB,yBAAgB,EAAA,KAAc;;MAElB,8BAAgB,GAAA;IAC5B,MAAgB,mBAAG,GAAA;QACH,MAAA,qBAAG,CAAAA,oBAAe,CAAA,CAAA;KACnB;IACf,MAAiB,oBAAG,GAAA;QACT,MAAA,qBAAe,CAAAA,oBAAA,CAAA,CAAA;KACjB;AACT,CAAA,CAAA;AACA,MAAA,oBAAgC,GAAA;AAChC,IAAA,GAAA,EAAA,SAAA,CAAA,GAAkB;IACpB,OAAA,EAAA,OAAA;AAEF,IAAM,GAAA,EAAA;AACF,IAAA,EAAA,EAAA,SAAa,CAAA,YAAS;AACtB,CAAA,CAAA;AACA,MAAA,0BAAwB,GAAA;AACxB,IAAA,YAAY,EAAE,SAAS,CAAA,YAAa;IACpC,eAAgB,EAAA;;AAEhB,MAAA,2BAA0B,GAAA;IAC1B,sCAAyB,CAAA,IAAA;AACzB,IAAA,MAAA,EAAA,CAAS,EAAE,SAAS,CAAA,qBAAkB,CAAA,CAAA;AACtC,CAAA,CAAA;MACiB;AACjB,IAAA,WAAA,EAAA;AACA,QAAA,OAAA,EAAA,EAAA;QACF,UAAA,EAAA,EAAA;AAEF,KAAA;;;;;;;;;;;AAWG,QAAA,GAAA,6BAAA;AACH,QAAM,GAAA,gBAAoB;KACd,CAAA;IACR,OAAS;AACT,QAAA,WAAA,EAAA,gBAAiC,CAAC,eAAC,CAAA;QAClB,aAAA,EAAG,EAAA,GAAA,sBAAkB,EAAA,GAAA,iBAAA,EAAA;QACZ,aAAA,EAAA,aAAG;QAC/B,YAAA,EAAA,EAAA,GAAA,qBAAA,EAAA,GAAA,gBAAA,EAAA;AAEF,QAAA,gBAAA,EAAA,qBAAA;;;;AAIG,QAAA,iBAAA,EAAA,iBAAA,IAAA,0BAAA;AACH,QAAM,kBAAsB,oBAAA,EAAA,GAAA,WAAA,EAAA;QACC,SAAA,EAAA,EAAA,GAAA,yBAAU,EAAA,GAAA,SAAA,EAAA;QACf,sBAAG,EAAA,sBAAQ,IAAA,IAAA;QACjC,iBAAA,EAAA,iBAAA,IAAA,IAAA;AAEF,QAAA,iBAAA,EAAA,iBAAA,IAAA,IAAA;;;;;;;AAOG,SAAA,gBAAA,CAAA,WAAA,EAAA;AACH,IAAM,OAAA;QACY,kBAAG,EAAA,EAAA;QACA,iBAAG,EAAA,2BAAQ;QACpB,0BAAY,EAAA,KAAA;QACP,GAAA,WAAG;KAClB,CAAA;AAEF,CAAA;;;;AAIG;AACG,2BAAqB,CAAA,MAAA,EAAA;IACvB,QAAyB,MAAA,CAAA,WAAC,CAAE,SAAQ,CAAA,OAAA,CAAA,YAAA,KAAA,YAAA,CAAA,IAAA,EAAA;;;;;"}
@@ -1,63 +1,63 @@
1
- import { BaseAuthRequest } from "../request/BaseAuthRequest";
2
- import { SignedHttpRequest } from "./SignedHttpRequest";
3
- /**
4
- * The PkceCodes type describes the structure
5
- * of objects that contain PKCE code
6
- * challenge and verifier pairs
7
- */
8
- export type PkceCodes = {
9
- verifier: string;
10
- challenge: string;
11
- };
12
- export type SignedHttpRequestParameters = Pick<BaseAuthRequest, "resourceRequestMethod" | "resourceRequestUri" | "shrClaims" | "shrNonce"> & {
13
- correlationId?: string;
14
- };
15
- /**
16
- * Interface for crypto functions used by library
17
- */
18
- export interface ICrypto {
19
- /**
20
- * Creates a guid randomly.
21
- */
22
- createNewGuid(): string;
23
- /**
24
- * base64 Encode string
25
- * @param input
26
- */
27
- base64Encode(input: string): string;
28
- /**
29
- * base64 decode string
30
- * @param input
31
- */
32
- base64Decode(input: string): string;
33
- /**
34
- * Generate PKCE codes for OAuth. See RFC here: https://tools.ietf.org/html/rfc7636
35
- */
36
- generatePkceCodes(): Promise<PkceCodes>;
37
- /**
38
- * Generates an JWK RSA S256 Thumbprint
39
- * @param request
40
- */
41
- getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>;
42
- /**
43
- * Removes cryptographic keypair from key store matching the keyId passed in
44
- * @param kid
45
- */
46
- removeTokenBindingKey(kid: string): Promise<boolean>;
47
- /**
48
- * Removes all cryptographic keys from IndexedDB storage
49
- */
50
- clearKeystore(): Promise<boolean>;
51
- /**
52
- * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.
53
- * @param accessToken
54
- */
55
- signJwt(payload: SignedHttpRequest, kid: string, correlationId?: string): Promise<string>;
56
- /**
57
- * Returns the SHA-256 hash of an input string
58
- * @param plainText
59
- */
60
- hashString(plainText: string): Promise<string>;
61
- }
62
- export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto;
1
+ import { BaseAuthRequest } from "../request/BaseAuthRequest";
2
+ import { SignedHttpRequest } from "./SignedHttpRequest";
3
+ /**
4
+ * The PkceCodes type describes the structure
5
+ * of objects that contain PKCE code
6
+ * challenge and verifier pairs
7
+ */
8
+ export type PkceCodes = {
9
+ verifier: string;
10
+ challenge: string;
11
+ };
12
+ export type SignedHttpRequestParameters = Pick<BaseAuthRequest, "resourceRequestMethod" | "resourceRequestUri" | "shrClaims" | "shrNonce"> & {
13
+ correlationId?: string;
14
+ };
15
+ /**
16
+ * Interface for crypto functions used by library
17
+ */
18
+ export interface ICrypto {
19
+ /**
20
+ * Creates a guid randomly.
21
+ */
22
+ createNewGuid(): string;
23
+ /**
24
+ * base64 Encode string
25
+ * @param input
26
+ */
27
+ base64Encode(input: string): string;
28
+ /**
29
+ * base64 decode string
30
+ * @param input
31
+ */
32
+ base64Decode(input: string): string;
33
+ /**
34
+ * Generate PKCE codes for OAuth. See RFC here: https://tools.ietf.org/html/rfc7636
35
+ */
36
+ generatePkceCodes(): Promise<PkceCodes>;
37
+ /**
38
+ * Generates an JWK RSA S256 Thumbprint
39
+ * @param request
40
+ */
41
+ getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>;
42
+ /**
43
+ * Removes cryptographic keypair from key store matching the keyId passed in
44
+ * @param kid
45
+ */
46
+ removeTokenBindingKey(kid: string): Promise<boolean>;
47
+ /**
48
+ * Removes all cryptographic keys from IndexedDB storage
49
+ */
50
+ clearKeystore(): Promise<boolean>;
51
+ /**
52
+ * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.
53
+ * @param accessToken
54
+ */
55
+ signJwt(payload: SignedHttpRequest, kid: string, correlationId?: string): Promise<string>;
56
+ /**
57
+ * Returns the SHA-256 hash of an input string
58
+ * @param plainText
59
+ */
60
+ hashString(plainText: string): Promise<string>;
61
+ }
62
+ export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto;
63
63
  //# sourceMappingURL=ICrypto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ICrypto.d.ts","sourceRoot":"","sources":["../../src/crypto/ICrypto.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;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,EACf,uBAAuB,GAAG,oBAAoB,GAAG,WAAW,GAAG,UAAU,CAC5E,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,i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AM,CAAC;IACpC;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC;;;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,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,OA4B3C,CAAC"}
@@ -1,48 +1,40 @@
1
- /*! @azure/msal-common v14.0.3 2023-09-05 */
1
+ /*! @azure/msal-common v14.1.0-alpha.0 2023-09-20 */
2
2
  'use strict';
3
- import { AuthError } from '../error/AuthError.mjs';
3
+ import { createClientAuthError } from '../error/ClientAuthError.mjs';
4
+ import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';
4
5
 
5
- /*
6
- * Copyright (c) Microsoft Corporation. All rights reserved.
7
- * Licensed under the MIT License.
8
- */
9
- const DEFAULT_CRYPTO_IMPLEMENTATION = {
10
- createNewGuid: () => {
11
- const notImplErr = "Crypto interface - createNewGuid() has not been implemented";
12
- throw AuthError.createUnexpectedError(notImplErr);
13
- },
14
- base64Decode: () => {
15
- const notImplErr = "Crypto interface - base64Decode() has not been implemented";
16
- throw AuthError.createUnexpectedError(notImplErr);
17
- },
18
- base64Encode: () => {
19
- const notImplErr = "Crypto interface - base64Encode() has not been implemented";
20
- throw AuthError.createUnexpectedError(notImplErr);
21
- },
22
- async generatePkceCodes() {
23
- const notImplErr = "Crypto interface - generatePkceCodes() has not been implemented";
24
- throw AuthError.createUnexpectedError(notImplErr);
25
- },
26
- async getPublicKeyThumbprint() {
27
- const notImplErr = "Crypto interface - getPublicKeyThumbprint() has not been implemented";
28
- throw AuthError.createUnexpectedError(notImplErr);
29
- },
30
- async removeTokenBindingKey() {
31
- const notImplErr = "Crypto interface - removeTokenBindingKey() has not been implemented";
32
- throw AuthError.createUnexpectedError(notImplErr);
33
- },
34
- async clearKeystore() {
35
- const notImplErr = "Crypto interface - clearKeystore() has not been implemented";
36
- throw AuthError.createUnexpectedError(notImplErr);
37
- },
38
- async signJwt() {
39
- const notImplErr = "Crypto interface - signJwt() has not been implemented";
40
- throw AuthError.createUnexpectedError(notImplErr);
41
- },
42
- async hashString() {
43
- const notImplErr = "Crypto interface - hashString() has not been implemented";
44
- throw AuthError.createUnexpectedError(notImplErr);
45
- },
6
+ /*
7
+ * Copyright (c) Microsoft Corporation. All rights reserved.
8
+ * Licensed under the MIT License.
9
+ */
10
+ const DEFAULT_CRYPTO_IMPLEMENTATION = {
11
+ createNewGuid: () => {
12
+ throw createClientAuthError(methodNotImplemented);
13
+ },
14
+ base64Decode: () => {
15
+ throw createClientAuthError(methodNotImplemented);
16
+ },
17
+ base64Encode: () => {
18
+ throw createClientAuthError(methodNotImplemented);
19
+ },
20
+ async generatePkceCodes() {
21
+ throw createClientAuthError(methodNotImplemented);
22
+ },
23
+ async getPublicKeyThumbprint() {
24
+ throw createClientAuthError(methodNotImplemented);
25
+ },
26
+ async removeTokenBindingKey() {
27
+ throw createClientAuthError(methodNotImplemented);
28
+ },
29
+ async clearKeystore() {
30
+ throw createClientAuthError(methodNotImplemented);
31
+ },
32
+ async signJwt() {
33
+ throw createClientAuthError(methodNotImplemented);
34
+ },
35
+ async hashString() {
36
+ throw createClientAuthError(methodNotImplemented);
37
+ },
46
38
  };
47
39
 
48
40
  export { DEFAULT_CRYPTO_IMPLEMENTATION };
@@ -1 +1 @@
1
- {"version":3,"file":"ICrypto.mjs","sources":["../../src/crypto/ICrypto.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAMA;AACA;AAEA;;;AAIG,IAAA,aAAA,EAAA,MAAA;AACH,QAAM,gBAAkB,GAAA,6DAAA,CAAA;QACZ,MAAE,SAAO,CAAA,qBAAA,CAAA,UAAA,CAAA,CAAA;KACR;IACX,YAAA,EAAA,MAAA;AAEF,QAAY,MAAA,UAAA,GAAA,4DAEe,CAAA;QAEV,MAAA,SAAG,CAAA,qBAAO,CAAA,UAAA,CAAA,CAAA;KACzB;AAEF,IAAA,YAAA,EAAA,MAAA;;AAEG,QAAA,MAAA,SAAA,CAAA,qBAAA,CAAA,UAAA,CAAA,CAAA;AACH,KAAA;AACI,IAAA,MAAA,iBAAA,GAAA;;AAEG,QAAA,MAAA,SAAA,CAAA,qBAAA,CAAA,UAAA,CAAA,CAAA;KACU;AACb,IAAA,MAAA,sBAAA,GAAA;;;AAGG,KAAA;AACH,IAAA,MAAA,qBAA0B;AAC1B,QAAA,MAAA,UAAA,GAAA,qEAAA,CAAA;;;AAGG,IAAA,MAAA,aAAA,GAAA;AACH,QAAA,MAAA,UAAoB,GAAM,6DAAU,CAAA;AACpC,QAAA,MAAA,SAAA,CAAA,qBAAA,CAAA,UAAA,CAAA,CAAA;;AAEG,IAAA,MAAA,OAAA,GAAA;AACH,QAAA,MAAA,UAAqB,GAAA,uDAAmB,CAAA;AACxC,QAAA,MAAA,SAAA,CAAA,qBAAA,CAAA,UAAA,CAAA,CAAA;;;AAGG,QAAA,MAAA,UAAA,GAAA,0DAAA,CAAA;QACmB,MAAA,SAAA,CAAA,qBACT,CAAA,UAAA,CAAA,CAAA;AAEb,KAAA;;;;;"}
1
+ {"version":3,"file":"ICrypto.mjs","sources":["../../src/crypto/ICrypto.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;AASA;AACA;AAEA;;;AAIG,IAAA,aAAA,EAAA,MAAA;AACH,QAAM,2BAAkB,CAAAA,oBAAA,CAAA,CAAA;KACZ;IACR,oBAAkB;QACpB,MAAA,qBAAA,CAAAA,oBAAA,CAAA,CAAA;AAEF,KAAA;IAII,YAAa,EAAC,MAAE;QAClB,MAAA,qBAAA,CAAAA,oBAAA,CAAA,CAAA;AAEF,KAAA;;AAEG,QAAA,MAAA,qBAAA,CAAAA,oBAAA,CAAA,CAAA;AACH,KAAA;AACI,IAAA,MAAA,sBAAA,GAAA;;AAEG,KAAA;IACH,MAAa,qBAAW,GAAA;AACxB,QAAA,MAAA,qBAAA,CAAAA,oBAAA,CAAA,CAAA;;;AAGG,QAAA,MAAA,qBAAA,CAAAA,oBAAA,CAAA,CAAA;AACH,KAAA;AACA,IAAA,MAAA,OAAA,GAAA;;;AAGG,IAAA,MAAA,UAAA,GAAA;AACH,QAAA,MAAA,0CAAoC,CAAA,CAAA;AACpC,KAAA;;;;;"}
@@ -1,5 +1,5 @@
1
- export interface IGuidGenerator {
2
- generateGuid(): string;
3
- isGuid(guid: string): boolean;
4
- }
1
+ export interface IGuidGenerator {
2
+ generateGuid(): string;
3
+ isGuid(guid: string): boolean;
4
+ }
5
5
  //# sourceMappingURL=IGuidGenerator.d.ts.map
@@ -1,23 +1,23 @@
1
- import { JsonTypes } from "../utils/Constants";
2
- export type JoseHeaderOptions = {
3
- typ?: JsonTypes;
4
- alg?: string;
5
- kid?: string;
6
- };
7
- /** @internal */
8
- export declare class JoseHeader {
9
- typ?: JsonTypes;
10
- alg?: string;
11
- kid?: string;
12
- constructor(options: JoseHeaderOptions);
13
- /**
14
- * Builds SignedHttpRequest formatted JOSE Header from the
15
- * JOSE Header options provided or previously set on the object and returns
16
- * the stringified header object.
17
- * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding.
18
- * @param shrHeaderOptions
19
- * @returns
20
- */
21
- static getShrHeaderString(shrHeaderOptions: JoseHeaderOptions): string;
22
- }
1
+ import { JsonTypes } from "../utils/Constants";
2
+ export type JoseHeaderOptions = {
3
+ typ?: JsonTypes;
4
+ alg?: string;
5
+ kid?: string;
6
+ };
7
+ /** @internal */
8
+ export declare class JoseHeader {
9
+ typ?: JsonTypes;
10
+ alg?: string;
11
+ kid?: string;
12
+ constructor(options: JoseHeaderOptions);
13
+ /**
14
+ * Builds SignedHttpRequest formatted JOSE Header from the
15
+ * JOSE Header options provided or previously set on the object and returns
16
+ * the stringified header object.
17
+ * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding.
18
+ * @param shrHeaderOptions
19
+ * @returns
20
+ */
21
+ static getShrHeaderString(shrHeaderOptions: JoseHeaderOptions): string;
22
+ }
23
23
  //# sourceMappingURL=JoseHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"JoseHeader.d.ts","sourceRoot":"","sources":["../../src/crypto/JoseHeader.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,qBAAa,UAAU;IACZ,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;gBAER,OAAO,EAAE,iBAAiB;IAMtC;;;;;;;OAOG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,MAAM;CAoBzE"}
1
+ {"version":3,"file":"JoseHeader.d.ts","sourceRoot":"","sources":["../../src/crypto/JoseHeader.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,qBAAa,UAAU;IACZ,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;gBAER,OAAO,EAAE,iBAAiB;IAMtC;;;;;;;OAOG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,MAAM;CAoBzE"}
@@ -1,44 +1,45 @@
1
- /*! @azure/msal-common v14.0.3 2023-09-05 */
1
+ /*! @azure/msal-common v14.1.0-alpha.0 2023-09-20 */
2
2
  'use strict';
3
- import { JoseHeaderError } from '../error/JoseHeaderError.mjs';
3
+ import { createJoseHeaderError } from '../error/JoseHeaderError.mjs';
4
4
  import { JsonTypes } from '../utils/Constants.mjs';
5
+ import { missingKidError, missingAlgError } from '../error/JoseHeaderErrorCodes.mjs';
5
6
 
6
- /*
7
- * Copyright (c) Microsoft Corporation. All rights reserved.
8
- * Licensed under the MIT License.
9
- */
10
- /** @internal */
11
- class JoseHeader {
12
- constructor(options) {
13
- this.typ = options.typ;
14
- this.alg = options.alg;
15
- this.kid = options.kid;
16
- }
17
- /**
18
- * Builds SignedHttpRequest formatted JOSE Header from the
19
- * JOSE Header options provided or previously set on the object and returns
20
- * the stringified header object.
21
- * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding.
22
- * @param shrHeaderOptions
23
- * @returns
24
- */
25
- static getShrHeaderString(shrHeaderOptions) {
26
- // KeyID is required on the SHR header
27
- if (!shrHeaderOptions.kid) {
28
- throw JoseHeaderError.createMissingKidError();
29
- }
30
- // Alg is required on the SHR header
31
- if (!shrHeaderOptions.alg) {
32
- throw JoseHeaderError.createMissingAlgError();
33
- }
34
- const shrHeader = new JoseHeader({
35
- // Access Token PoP headers must have type pop, but the type header can be overriden for special cases
36
- typ: shrHeaderOptions.typ || JsonTypes.Pop,
37
- kid: shrHeaderOptions.kid,
38
- alg: shrHeaderOptions.alg,
39
- });
40
- return JSON.stringify(shrHeader);
41
- }
7
+ /*
8
+ * Copyright (c) Microsoft Corporation. All rights reserved.
9
+ * Licensed under the MIT License.
10
+ */
11
+ /** @internal */
12
+ class JoseHeader {
13
+ constructor(options) {
14
+ this.typ = options.typ;
15
+ this.alg = options.alg;
16
+ this.kid = options.kid;
17
+ }
18
+ /**
19
+ * Builds SignedHttpRequest formatted JOSE Header from the
20
+ * JOSE Header options provided or previously set on the object and returns
21
+ * the stringified header object.
22
+ * Throws if keyId or algorithm aren't provided since they are required for Access Token Binding.
23
+ * @param shrHeaderOptions
24
+ * @returns
25
+ */
26
+ static getShrHeaderString(shrHeaderOptions) {
27
+ // KeyID is required on the SHR header
28
+ if (!shrHeaderOptions.kid) {
29
+ throw createJoseHeaderError(missingKidError);
30
+ }
31
+ // Alg is required on the SHR header
32
+ if (!shrHeaderOptions.alg) {
33
+ throw createJoseHeaderError(missingAlgError);
34
+ }
35
+ const shrHeader = new JoseHeader({
36
+ // Access Token PoP headers must have type pop, but the type header can be overriden for special cases
37
+ typ: shrHeaderOptions.typ || JsonTypes.Pop,
38
+ kid: shrHeaderOptions.kid,
39
+ alg: shrHeaderOptions.alg,
40
+ });
41
+ return JSON.stringify(shrHeader);
42
+ }
42
43
  }
43
44
 
44
45
  export { JoseHeader };
@@ -1 +1 @@
1
- {"version":3,"file":"JoseHeader.mjs","sources":["../../src/crypto/JoseHeader.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAMA;AAEA;;;AAMA;AACA,MAAA,UAAuB,CAAA;IACZ,WAAM,CAAA,OAAU,EAAA;QACZ,IAAE,CAAA,GAAM,GAAC,OAAA,CAAA,GAAA,CAAA;QACT,IAAE,CAAA,GAAM,GAAC,OAAA,CAAA,GAAA,CAAA;AAER,QAAA,IAAA,CAAA,GAAA,GAAA,OAA0B,CAAA,GAAA,CAAA;AAMtC,KAAA;;;;;;;AAOG;AACH;AAoBH,IAAA,OAAA,kBAAA,CAAA,gBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"JoseHeader.mjs","sources":["../../src/crypto/JoseHeader.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AASA;AAEA;;;AAMA;AACA,MAAA,UAAuB,CAAA;IACZ,WAAM,CAAA,OAAU,EAAA;QACZ,IAAE,CAAA,GAAM,GAAC,OAAA,CAAA,GAAA,CAAA;QACT,IAAE,CAAA,GAAM,GAAC,OAAA,CAAA,GAAA,CAAA;AAER,QAAA,IAAA,CAAA,GAAA,GAAA,OAA0B,CAAA,GAAA,CAAA;AAMtC,KAAA;;;;;;;AAOG;AACH;AAoBH,IAAA,OAAA,kBAAA,CAAA,gBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;"}