@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":"RequestParameterBuilder.mjs","sources":["../../src/request/RequestParameterBuilder.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAKA;AAeA;AAEA;AAIA;;AAWI,MAAA,uBAAA,CAAA;;AAEG,QAAA,IAAA,CAAA,UAAA,GAAA,IAAA,GAAA,EAAA,CAAA;AACH,KAAA;AAOA;;AAEG;AACH,IAAA,mBAAA,GAAA;AASA,QAAA,IAAA,CAAA,UAAA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AAA,CAAA,CAAA;;;AAGG;AACH;AAIA;;;AAGG,QAAA,IAAA,KAAA,EAAA;AACH,YAAA,IAAA,CAAA,UAAuB,CAAC,GAAA,CAAA,mBAAuB,KAAI,EAAA,kBAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AAUnD,SAAA;AAoCA,KAAA;;;AAGG;AACH;AAOA,IAAA,QAAA,CAAA,KAAA,EAAA;;;AAGG;AACH;AAOA;;;AAGG;AACH,IAAA,sBAAuB,CAAA,aAAa,EAAA,mBAAA,EAAA;AAapC,QAAA,gBAAA,CAAA,2BAAA,CAAA,aAAA,EAAA,mBAAA,CAAA,CAAA;;AAEG,YAAA,IAAA,CAAA,UAAA,CAAA,GAAA,CAAA,kBAAA,CAAA,cAAA,EAAA,kBAAA,CAAA,aAAA,CAAA,CAAA,CAAA;AACH,YAAA,IAAU,CAAA,UAAc,CAAA,GAAA,CAAA,kBAAa,CAAA,qBAAA,EAAA,kBAAA,CAAA,mBAAA,CAAA,CAAA,CAAA;AAarC,SAAA;;;AAGG,SAAA;AACH,KAAA;AAWA;;AAEG;AACH;AAOA,IAAA,oBAAA,CAAA,IAAA,EAAA;;AAEG,KAAA;AACH;AAOA;;AAEG;AACH,IAAA,aAAA,CAAA;AASH,QAAA,IAAA,CAAA,UAAA,CAAA,GAAA,CAAA,kBAAA,CAAA,WAAA,EAAA,kBAAA,CAAA,IAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,34 +1,34 @@
1
- import { StringDict } from "../utils/MsalTypes";
2
- /**
3
- * Validates server consumable params from the "request" objects
4
- */
5
- export declare class RequestValidator {
6
- /**
7
- * Utility to check if the `redirectUri` in the request is a non-null value
8
- * @param redirectUri
9
- */
10
- static validateRedirectUri(redirectUri: string): void;
11
- /**
12
- * Utility to validate prompt sent by the user in the request
13
- * @param prompt
14
- */
15
- static validatePrompt(prompt: string): void;
16
- static validateClaims(claims: string): void;
17
- /**
18
- * Utility to validate code_challenge and code_challenge_method
19
- * @param codeChallenge
20
- * @param codeChallengeMethod
21
- */
22
- static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void;
23
- /**
24
- * Utility to validate code_challenge_method
25
- * @param codeChallengeMethod
26
- */
27
- static validateCodeChallengeMethod(codeChallengeMethod: string): void;
28
- /**
29
- * Removes unnecessary, duplicate, and empty string query parameters from extraQueryParameters
30
- * @param request
31
- */
32
- static sanitizeEQParams(eQParams: StringDict, queryParams: Map<string, string>): StringDict;
33
- }
1
+ import { StringDict } from "../utils/MsalTypes";
2
+ /**
3
+ * Validates server consumable params from the "request" objects
4
+ */
5
+ export declare class RequestValidator {
6
+ /**
7
+ * Utility to check if the `redirectUri` in the request is a non-null value
8
+ * @param redirectUri
9
+ */
10
+ static validateRedirectUri(redirectUri: string): void;
11
+ /**
12
+ * Utility to validate prompt sent by the user in the request
13
+ * @param prompt
14
+ */
15
+ static validatePrompt(prompt: string): void;
16
+ static validateClaims(claims: string): void;
17
+ /**
18
+ * Utility to validate code_challenge and code_challenge_method
19
+ * @param codeChallenge
20
+ * @param codeChallengeMethod
21
+ */
22
+ static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void;
23
+ /**
24
+ * Utility to validate code_challenge_method
25
+ * @param codeChallengeMethod
26
+ */
27
+ static validateCodeChallengeMethod(codeChallengeMethod: string): void;
28
+ /**
29
+ * Removes unnecessary, duplicate, and empty string query parameters from extraQueryParameters
30
+ * @param request
31
+ */
32
+ static sanitizeEQParams(eQParams: StringDict, queryParams: Map<string, string>): StringDict;
33
+ }
34
34
  //# sourceMappingURL=RequestValidator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestValidator.d.ts","sourceRoot":"","sources":["../../src/request/RequestValidator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,qBAAa,gBAAgB;IACzB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAMrD;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAY3C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ3C;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAC9B,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,GAC5B,IAAI;IAQP;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI;IAWrE;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CACnB,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,UAAU;CAiBhB"}
1
+ {"version":3,"file":"RequestValidator.d.ts","sourceRoot":"","sources":["../../src/request/RequestValidator.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;GAEG;AACH,qBAAa,gBAAgB;IACzB;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAQrD;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAc3C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAU3C;;;;OAIG;IACH,MAAM,CAAC,2BAA2B,CAC9B,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,GAC5B,IAAI;IAUP;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI;IAarE;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CACnB,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,UAAU;CAiBhB"}
@@ -1,88 +1,89 @@
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 { ClientConfigurationError } from '../error/ClientConfigurationError.mjs';
3
+ import { createClientConfigurationError } from '../error/ClientConfigurationError.mjs';
4
4
  import { CodeChallengeMethodValues, PromptValue } from '../utils/Constants.mjs';
5
+ import { redirectUriEmpty, invalidPromptValue, invalidClaims, pkceParamsMissing, invalidCodeChallengeMethod } from '../error/ClientConfigurationErrorCodes.mjs';
5
6
 
6
- /*
7
- * Copyright (c) Microsoft Corporation. All rights reserved.
8
- * Licensed under the MIT License.
9
- */
10
- /**
11
- * Validates server consumable params from the "request" objects
12
- */
13
- class RequestValidator {
14
- /**
15
- * Utility to check if the `redirectUri` in the request is a non-null value
16
- * @param redirectUri
17
- */
18
- static validateRedirectUri(redirectUri) {
19
- if (!redirectUri) {
20
- throw ClientConfigurationError.createRedirectUriEmptyError();
21
- }
22
- }
23
- /**
24
- * Utility to validate prompt sent by the user in the request
25
- * @param prompt
26
- */
27
- static validatePrompt(prompt) {
28
- const promptValues = [];
29
- for (const value in PromptValue) {
30
- promptValues.push(PromptValue[value]);
31
- }
32
- if (promptValues.indexOf(prompt) < 0) {
33
- throw ClientConfigurationError.createInvalidPromptError(prompt);
34
- }
35
- }
36
- static validateClaims(claims) {
37
- try {
38
- JSON.parse(claims);
39
- }
40
- catch (e) {
41
- throw ClientConfigurationError.createInvalidClaimsRequestError();
42
- }
43
- }
44
- /**
45
- * Utility to validate code_challenge and code_challenge_method
46
- * @param codeChallenge
47
- * @param codeChallengeMethod
48
- */
49
- static validateCodeChallengeParams(codeChallenge, codeChallengeMethod) {
50
- if (!codeChallenge || !codeChallengeMethod) {
51
- throw ClientConfigurationError.createInvalidCodeChallengeParamsError();
52
- }
53
- else {
54
- this.validateCodeChallengeMethod(codeChallengeMethod);
55
- }
56
- }
57
- /**
58
- * Utility to validate code_challenge_method
59
- * @param codeChallengeMethod
60
- */
61
- static validateCodeChallengeMethod(codeChallengeMethod) {
62
- if ([
63
- CodeChallengeMethodValues.PLAIN,
64
- CodeChallengeMethodValues.S256,
65
- ].indexOf(codeChallengeMethod) < 0) {
66
- throw ClientConfigurationError.createInvalidCodeChallengeMethodError();
67
- }
68
- }
69
- /**
70
- * Removes unnecessary, duplicate, and empty string query parameters from extraQueryParameters
71
- * @param request
72
- */
73
- static sanitizeEQParams(eQParams, queryParams) {
74
- if (!eQParams) {
75
- return {};
76
- }
77
- // Remove any query parameters already included in SSO params
78
- queryParams.forEach((_value, key) => {
79
- if (eQParams[key]) {
80
- delete eQParams[key];
81
- }
82
- });
83
- // remove empty string parameters
84
- return Object.fromEntries(Object.entries(eQParams).filter((kv) => kv[1] !== ""));
85
- }
7
+ /*
8
+ * Copyright (c) Microsoft Corporation. All rights reserved.
9
+ * Licensed under the MIT License.
10
+ */
11
+ /**
12
+ * Validates server consumable params from the "request" objects
13
+ */
14
+ class RequestValidator {
15
+ /**
16
+ * Utility to check if the `redirectUri` in the request is a non-null value
17
+ * @param redirectUri
18
+ */
19
+ static validateRedirectUri(redirectUri) {
20
+ if (!redirectUri) {
21
+ throw createClientConfigurationError(redirectUriEmpty);
22
+ }
23
+ }
24
+ /**
25
+ * Utility to validate prompt sent by the user in the request
26
+ * @param prompt
27
+ */
28
+ static validatePrompt(prompt) {
29
+ const promptValues = [];
30
+ for (const value in PromptValue) {
31
+ promptValues.push(PromptValue[value]);
32
+ }
33
+ if (promptValues.indexOf(prompt) < 0) {
34
+ throw createClientConfigurationError(invalidPromptValue);
35
+ }
36
+ }
37
+ static validateClaims(claims) {
38
+ try {
39
+ JSON.parse(claims);
40
+ }
41
+ catch (e) {
42
+ throw createClientConfigurationError(invalidClaims);
43
+ }
44
+ }
45
+ /**
46
+ * Utility to validate code_challenge and code_challenge_method
47
+ * @param codeChallenge
48
+ * @param codeChallengeMethod
49
+ */
50
+ static validateCodeChallengeParams(codeChallenge, codeChallengeMethod) {
51
+ if (!codeChallenge || !codeChallengeMethod) {
52
+ throw createClientConfigurationError(pkceParamsMissing);
53
+ }
54
+ else {
55
+ this.validateCodeChallengeMethod(codeChallengeMethod);
56
+ }
57
+ }
58
+ /**
59
+ * Utility to validate code_challenge_method
60
+ * @param codeChallengeMethod
61
+ */
62
+ static validateCodeChallengeMethod(codeChallengeMethod) {
63
+ if ([
64
+ CodeChallengeMethodValues.PLAIN,
65
+ CodeChallengeMethodValues.S256,
66
+ ].indexOf(codeChallengeMethod) < 0) {
67
+ throw createClientConfigurationError(invalidCodeChallengeMethod);
68
+ }
69
+ }
70
+ /**
71
+ * Removes unnecessary, duplicate, and empty string query parameters from extraQueryParameters
72
+ * @param request
73
+ */
74
+ static sanitizeEQParams(eQParams, queryParams) {
75
+ if (!eQParams) {
76
+ return {};
77
+ }
78
+ // Remove any query parameters already included in SSO params
79
+ queryParams.forEach((_value, key) => {
80
+ if (eQParams[key]) {
81
+ delete eQParams[key];
82
+ }
83
+ });
84
+ // remove empty string parameters
85
+ return Object.fromEntries(Object.entries(eQParams).filter((kv) => kv[1] !== ""));
86
+ }
86
87
  }
87
88
 
88
89
  export { RequestValidator };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestValidator.mjs","sources":["../../src/request/RequestValidator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAOA;AAEA;;AAEG;;;AAKI;AACH,MAA0B,gBAAA,CAAA;AAM1B;;;AAGG;AACH,IAAA,OAAO,iCAAoC;AAY3C,QAAA,IAAqB,CAAA,WAAA,EAAC;AAQtB,YAAA,MAAA,wBAAA,CAAA,2BAAA,EAAA,CAAA;;;;AAIG;;AAYH;;;AAGG,QAAA,KAAA,MAAA,KAAA,IAAA,WAAA,EAAA;AACH,YAAkC,YAAA,CAAA,IAAA,CAAA;AAWlC,SAAA;;;AAGG,SAAA;AACH,KAAA;AAoBH,IAAA,OAAA,cAAA,CAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RequestValidator.mjs","sources":["../../src/request/RequestValidator.ts"],"sourcesContent":[null],"names":["ClientConfigurationErrorCodes.redirectUriEmpty"],"mappings":";;;;;;AAUA;AAEA;;AAEG;;;AAKI;AACH,MAA0B,gBAAA,CAAA;AAQ1B;;;AAGG;AACH,IAAA,OAAO,iCAAoC;AAc3C,QAAA,IAAqB,CAAA,WAAA,EAAC;AAUtB,YAAA,MAAA,8BAAA,CAAAA,gBAAA,CAAA,CAAA;;;;AAIG;;AAcH;;;AAGG,QAAA,KAAA,MAAA,KAAA,IAAA,WAAA,EAAA;AACH,YAAkC,YAAA,CAAA,IAAA,CAAA;AAalC,SAAA;;;AAGG,SAAA;AACH,KAAA;AAoBH,IAAA,OAAA,cAAA,CAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,89 +1,89 @@
1
- /**
2
- * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes
3
- * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions
4
- * to ensure uniqueness of strings.
5
- */
6
- export declare class ScopeSet {
7
- private scopes;
8
- constructor(inputScopes: Array<string>);
9
- /**
10
- * Factory method to create ScopeSet from space-delimited string
11
- * @param inputScopeString
12
- * @param appClientId
13
- * @param scopesRequired
14
- */
15
- static fromString(inputScopeString: string): ScopeSet;
16
- /**
17
- * Creates the set of scopes to search for in cache lookups
18
- * @param inputScopeString
19
- * @returns
20
- */
21
- static createSearchScopes(inputScopeString: Array<string>): ScopeSet;
22
- /**
23
- * Used to validate the scopes input parameter requested by the developer.
24
- * @param {Array<string>} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.
25
- * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not
26
- */
27
- private validateInputScopes;
28
- /**
29
- * Check if a given scope is present in this set of scopes.
30
- * @param scope
31
- */
32
- containsScope(scope: string): boolean;
33
- /**
34
- * Check if a set of scopes is present in this set of scopes.
35
- * @param scopeSet
36
- */
37
- containsScopeSet(scopeSet: ScopeSet): boolean;
38
- /**
39
- * Check if set of scopes contains only the defaults
40
- */
41
- containsOnlyOIDCScopes(): boolean;
42
- /**
43
- * Appends single scope if passed
44
- * @param newScope
45
- */
46
- appendScope(newScope: string): void;
47
- /**
48
- * Appends multiple scopes if passed
49
- * @param newScopes
50
- */
51
- appendScopes(newScopes: Array<string>): void;
52
- /**
53
- * Removes element from set of scopes.
54
- * @param scope
55
- */
56
- removeScope(scope: string): void;
57
- /**
58
- * Removes default scopes from set of scopes
59
- * Primarily used to prevent cache misses if the default scopes are not returned from the server
60
- */
61
- removeOIDCScopes(): void;
62
- /**
63
- * Combines an array of scopes with the current set of scopes.
64
- * @param otherScopes
65
- */
66
- unionScopeSets(otherScopes: ScopeSet): Set<string>;
67
- /**
68
- * Check if scopes intersect between this set and another.
69
- * @param otherScopes
70
- */
71
- intersectingScopeSets(otherScopes: ScopeSet): boolean;
72
- /**
73
- * Returns size of set of scopes.
74
- */
75
- getScopeCount(): number;
76
- /**
77
- * Returns the scopes as an array of string values
78
- */
79
- asArray(): Array<string>;
80
- /**
81
- * Prints scopes into a space-delimited string
82
- */
83
- printScopes(): string;
84
- /**
85
- * Prints scopes into a space-delimited lower-case string (used for caching)
86
- */
87
- printScopesLowerCase(): string;
88
- }
1
+ /**
2
+ * The ScopeSet class creates a set of scopes. Scopes are case-insensitive, unique values, so the Set object in JS makes
3
+ * the most sense to implement for this class. All scopes are trimmed and converted to lower case strings in intersection and union functions
4
+ * to ensure uniqueness of strings.
5
+ */
6
+ export declare class ScopeSet {
7
+ private scopes;
8
+ constructor(inputScopes: Array<string>);
9
+ /**
10
+ * Factory method to create ScopeSet from space-delimited string
11
+ * @param inputScopeString
12
+ * @param appClientId
13
+ * @param scopesRequired
14
+ */
15
+ static fromString(inputScopeString: string): ScopeSet;
16
+ /**
17
+ * Creates the set of scopes to search for in cache lookups
18
+ * @param inputScopeString
19
+ * @returns
20
+ */
21
+ static createSearchScopes(inputScopeString: Array<string>): ScopeSet;
22
+ /**
23
+ * Used to validate the scopes input parameter requested by the developer.
24
+ * @param {Array<string>} inputScopes - Developer requested permissions. Not all scopes are guaranteed to be included in the access token returned.
25
+ * @param {boolean} scopesRequired - Boolean indicating whether the scopes array is required or not
26
+ */
27
+ private validateInputScopes;
28
+ /**
29
+ * Check if a given scope is present in this set of scopes.
30
+ * @param scope
31
+ */
32
+ containsScope(scope: string): boolean;
33
+ /**
34
+ * Check if a set of scopes is present in this set of scopes.
35
+ * @param scopeSet
36
+ */
37
+ containsScopeSet(scopeSet: ScopeSet): boolean;
38
+ /**
39
+ * Check if set of scopes contains only the defaults
40
+ */
41
+ containsOnlyOIDCScopes(): boolean;
42
+ /**
43
+ * Appends single scope if passed
44
+ * @param newScope
45
+ */
46
+ appendScope(newScope: string): void;
47
+ /**
48
+ * Appends multiple scopes if passed
49
+ * @param newScopes
50
+ */
51
+ appendScopes(newScopes: Array<string>): void;
52
+ /**
53
+ * Removes element from set of scopes.
54
+ * @param scope
55
+ */
56
+ removeScope(scope: string): void;
57
+ /**
58
+ * Removes default scopes from set of scopes
59
+ * Primarily used to prevent cache misses if the default scopes are not returned from the server
60
+ */
61
+ removeOIDCScopes(): void;
62
+ /**
63
+ * Combines an array of scopes with the current set of scopes.
64
+ * @param otherScopes
65
+ */
66
+ unionScopeSets(otherScopes: ScopeSet): Set<string>;
67
+ /**
68
+ * Check if scopes intersect between this set and another.
69
+ * @param otherScopes
70
+ */
71
+ intersectingScopeSets(otherScopes: ScopeSet): boolean;
72
+ /**
73
+ * Returns size of set of scopes.
74
+ */
75
+ getScopeCount(): number;
76
+ /**
77
+ * Returns the scopes as an array of string values
78
+ */
79
+ asArray(): Array<string>;
80
+ /**
81
+ * Prints scopes into a space-delimited string
82
+ */
83
+ printScopes(): string;
84
+ /**
85
+ * Prints scopes into a space-delimited lower-case string (used for caching)
86
+ */
87
+ printScopesLowerCase(): string;
88
+ }
89
89
  //# sourceMappingURL=ScopeSet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScopeSet.d.ts","sourceRoot":"","sources":["../../src/request/ScopeSet.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,qBAAa,QAAQ;IAEjB,OAAO,CAAC,MAAM,CAAc;gBAEhB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;IAgBtC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,GAAG,QAAQ;IAMrD;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,QAAQ;IAWpE;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;OAGG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IASrC;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAW7C;;OAEG;IACH,sBAAsB,IAAI,OAAO;IAWjC;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMnC;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAQ5C;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOhC;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAMxB;;;OAGG;IACH,cAAc,CAAC,WAAW,EAAE,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC;IAYlD;;;OAGG;IACH,qBAAqB,CAAC,WAAW,EAAE,QAAQ,GAAG,OAAO;IAgBrD;;OAEG;IACH,a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