@azure/msal-common 14.4.1-beta.0 → 14.5.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 (287) hide show
  1. package/dist/account/AccountInfo.d.ts +58 -31
  2. package/dist/account/AccountInfo.d.ts.map +1 -1
  3. package/dist/account/AccountInfo.mjs +64 -0
  4. package/dist/account/AccountInfo.mjs.map +1 -0
  5. package/dist/account/AuthToken.d.ts +17 -17
  6. package/dist/account/AuthToken.mjs +58 -58
  7. package/dist/account/AuthToken.mjs.map +1 -1
  8. package/dist/account/CcsCredential.d.ts +9 -9
  9. package/dist/account/CcsCredential.mjs +8 -8
  10. package/dist/account/CcsCredential.mjs.map +1 -1
  11. package/dist/account/ClientCredentials.d.ts +14 -14
  12. package/dist/account/ClientInfo.d.ts +18 -19
  13. package/dist/account/ClientInfo.d.ts.map +1 -1
  14. package/dist/account/ClientInfo.mjs +37 -37
  15. package/dist/account/ClientInfo.mjs.map +1 -1
  16. package/dist/account/TokenClaims.d.ts +83 -65
  17. package/dist/account/TokenClaims.d.ts.map +1 -1
  18. package/dist/account/TokenClaims.mjs +25 -0
  19. package/dist/account/TokenClaims.mjs.map +1 -0
  20. package/dist/authority/Authority.d.ts +253 -249
  21. package/dist/authority/Authority.d.ts.map +1 -1
  22. package/dist/authority/Authority.mjs +812 -789
  23. package/dist/authority/Authority.mjs.map +1 -1
  24. package/dist/authority/AuthorityFactory.d.ts +31 -31
  25. package/dist/authority/AuthorityFactory.mjs +47 -47
  26. package/dist/authority/AuthorityFactory.mjs.map +1 -1
  27. package/dist/authority/AuthorityMetadata.d.ts +503 -503
  28. package/dist/authority/AuthorityMetadata.mjs +603 -603
  29. package/dist/authority/AuthorityMetadata.mjs.map +1 -1
  30. package/dist/authority/AuthorityOptions.d.ts +27 -27
  31. package/dist/authority/AuthorityOptions.mjs +18 -18
  32. package/dist/authority/AuthorityOptions.mjs.map +1 -1
  33. package/dist/authority/AuthorityType.d.ts +10 -10
  34. package/dist/authority/AuthorityType.mjs +13 -13
  35. package/dist/authority/AuthorityType.mjs.map +1 -1
  36. package/dist/authority/AzureRegion.d.ts +1 -1
  37. package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
  38. package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
  39. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
  40. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +8 -8
  41. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs.map +1 -1
  42. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
  43. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +8 -8
  44. package/dist/authority/CloudInstanceDiscoveryResponse.mjs.map +1 -1
  45. package/dist/authority/ImdsOptions.d.ts +5 -5
  46. package/dist/authority/OIDCOptions.d.ts +8 -8
  47. package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
  48. package/dist/authority/OpenIdConfigResponse.mjs +10 -10
  49. package/dist/authority/OpenIdConfigResponse.mjs.map +1 -1
  50. package/dist/authority/ProtocolMode.d.ts +8 -8
  51. package/dist/authority/ProtocolMode.mjs +11 -11
  52. package/dist/authority/ProtocolMode.mjs.map +1 -1
  53. package/dist/authority/RegionDiscovery.d.ts +32 -32
  54. package/dist/authority/RegionDiscovery.mjs +106 -106
  55. package/dist/authority/RegionDiscovery.mjs.map +1 -1
  56. package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
  57. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
  58. package/dist/cache/CacheManager.d.ts +517 -485
  59. package/dist/cache/CacheManager.d.ts.map +1 -1
  60. package/dist/cache/CacheManager.mjs +1264 -1102
  61. package/dist/cache/CacheManager.mjs.map +1 -1
  62. package/dist/cache/entities/AccessTokenEntity.d.ts +25 -25
  63. package/dist/cache/entities/AccountEntity.d.ts +106 -101
  64. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  65. package/dist/cache/entities/AccountEntity.mjs +247 -219
  66. package/dist/cache/entities/AccountEntity.mjs.map +1 -1
  67. package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
  68. package/dist/cache/entities/AppMetadataEntity.mjs +66 -66
  69. package/dist/cache/entities/AppMetadataEntity.mjs.map +1 -1
  70. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +48 -48
  71. package/dist/cache/entities/AuthorityMetadataEntity.mjs +78 -78
  72. package/dist/cache/entities/AuthorityMetadataEntity.mjs.map +1 -1
  73. package/dist/cache/entities/CacheRecord.d.ts +14 -14
  74. package/dist/cache/entities/CacheRecord.mjs +14 -14
  75. package/dist/cache/entities/CacheRecord.mjs.map +1 -1
  76. package/dist/cache/entities/CredentialEntity.d.ts +30 -30
  77. package/dist/cache/entities/IdTokenEntity.d.ts +8 -8
  78. package/dist/cache/entities/RefreshTokenEntity.d.ts +5 -7
  79. package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -1
  80. package/dist/cache/entities/ServerTelemetryEntity.d.ts +5 -5
  81. package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
  82. package/dist/cache/entities/ThrottlingEntity.mjs +23 -23
  83. package/dist/cache/entities/ThrottlingEntity.mjs.map +1 -1
  84. package/dist/cache/interface/ICacheManager.d.ts +166 -166
  85. package/dist/cache/interface/ICachePlugin.d.ts +5 -5
  86. package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
  87. package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
  88. package/dist/cache/persistence/TokenCacheContext.mjs +25 -25
  89. package/dist/cache/persistence/TokenCacheContext.mjs.map +1 -1
  90. package/dist/cache/utils/CacheHelpers.d.ts +64 -64
  91. package/dist/cache/utils/CacheHelpers.d.ts.map +1 -1
  92. package/dist/cache/utils/CacheHelpers.mjs +231 -234
  93. package/dist/cache/utils/CacheHelpers.mjs.map +1 -1
  94. package/dist/cache/utils/CacheTypes.d.ts +69 -67
  95. package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
  96. package/dist/client/AuthorizationCodeClient.d.ts +74 -74
  97. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  98. package/dist/client/AuthorizationCodeClient.mjs +404 -403
  99. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  100. package/dist/client/BaseClient.d.ts +51 -51
  101. package/dist/client/BaseClient.mjs +100 -100
  102. package/dist/client/BaseClient.mjs.map +1 -1
  103. package/dist/client/RefreshTokenClient.d.ts +35 -35
  104. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  105. package/dist/client/RefreshTokenClient.mjs +189 -194
  106. package/dist/client/RefreshTokenClient.mjs.map +1 -1
  107. package/dist/client/SilentFlowClient.d.ts +27 -27
  108. package/dist/client/SilentFlowClient.mjs +118 -118
  109. package/dist/client/SilentFlowClient.mjs.map +1 -1
  110. package/dist/config/AppTokenProvider.d.ts +38 -38
  111. package/dist/config/ClientConfiguration.d.ts +150 -150
  112. package/dist/config/ClientConfiguration.mjs +97 -97
  113. package/dist/config/ClientConfiguration.mjs.map +1 -1
  114. package/dist/constants/AADServerParamKeys.d.ts +52 -0
  115. package/dist/constants/AADServerParamKeys.d.ts.map +1 -0
  116. package/dist/constants/AADServerParamKeys.mjs +60 -0
  117. package/dist/constants/AADServerParamKeys.mjs.map +1 -0
  118. package/dist/crypto/ICrypto.d.ts +58 -58
  119. package/dist/crypto/ICrypto.mjs +30 -30
  120. package/dist/crypto/ICrypto.mjs.map +1 -1
  121. package/dist/crypto/IGuidGenerator.d.ts +4 -4
  122. package/dist/crypto/JoseHeader.d.ts +22 -22
  123. package/dist/crypto/JoseHeader.mjs +37 -37
  124. package/dist/crypto/JoseHeader.mjs.map +1 -1
  125. package/dist/crypto/PopTokenGenerator.d.ts +60 -60
  126. package/dist/crypto/PopTokenGenerator.mjs +82 -82
  127. package/dist/crypto/PopTokenGenerator.mjs.map +1 -1
  128. package/dist/crypto/SignedHttpRequest.d.ts +15 -15
  129. package/dist/error/AuthError.d.ts +44 -44
  130. package/dist/error/AuthError.mjs +46 -46
  131. package/dist/error/AuthError.mjs.map +1 -1
  132. package/dist/error/AuthErrorCodes.d.ts +5 -5
  133. package/dist/error/AuthErrorCodes.mjs +9 -9
  134. package/dist/error/AuthErrorCodes.mjs.map +1 -1
  135. package/dist/error/ClientAuthError.d.ts +237 -237
  136. package/dist/error/ClientAuthError.mjs +249 -249
  137. package/dist/error/ClientAuthError.mjs.map +1 -1
  138. package/dist/error/ClientAuthErrorCodes.d.ts +44 -44
  139. package/dist/error/ClientAuthErrorCodes.mjs +48 -48
  140. package/dist/error/ClientAuthErrorCodes.mjs.map +1 -1
  141. package/dist/error/ClientConfigurationError.d.ts +128 -128
  142. package/dist/error/ClientConfigurationError.mjs +135 -135
  143. package/dist/error/ClientConfigurationError.mjs.map +1 -1
  144. package/dist/error/ClientConfigurationErrorCodes.d.ts +22 -22
  145. package/dist/error/ClientConfigurationErrorCodes.mjs +26 -26
  146. package/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
  147. package/dist/error/InteractionRequiredAuthError.d.ts +57 -57
  148. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  149. package/dist/error/InteractionRequiredAuthError.mjs +77 -78
  150. package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
  151. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts +5 -6
  152. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -1
  153. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +12 -13
  154. package/dist/error/InteractionRequiredAuthErrorCodes.mjs.map +1 -1
  155. package/dist/error/JoseHeaderError.d.ts +15 -15
  156. package/dist/error/JoseHeaderError.mjs +22 -22
  157. package/dist/error/JoseHeaderError.mjs.map +1 -1
  158. package/dist/error/JoseHeaderErrorCodes.d.ts +2 -2
  159. package/dist/error/JoseHeaderErrorCodes.mjs +6 -6
  160. package/dist/error/JoseHeaderErrorCodes.mjs.map +1 -1
  161. package/dist/error/ServerError.d.ts +7 -7
  162. package/dist/error/ServerError.mjs +14 -14
  163. package/dist/error/ServerError.mjs.map +1 -1
  164. package/dist/index.cjs +8645 -8295
  165. package/dist/index.cjs.map +1 -1
  166. package/dist/index.d.ts +99 -98
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.mjs +7 -3
  169. package/dist/index.mjs.map +1 -1
  170. package/dist/logger/Logger.d.ts +95 -95
  171. package/dist/logger/Logger.mjs +188 -188
  172. package/dist/logger/Logger.mjs.map +1 -1
  173. package/dist/network/INetworkModule.d.ts +29 -29
  174. package/dist/network/INetworkModule.mjs +12 -12
  175. package/dist/network/INetworkModule.mjs.map +1 -1
  176. package/dist/network/NetworkManager.d.ts +33 -33
  177. package/dist/network/NetworkManager.mjs +34 -34
  178. package/dist/network/NetworkManager.mjs.map +1 -1
  179. package/dist/network/RequestThumbprint.d.ts +18 -18
  180. package/dist/network/ThrottlingUtils.d.ts +42 -42
  181. package/dist/network/ThrottlingUtils.mjs +95 -95
  182. package/dist/network/ThrottlingUtils.mjs.map +1 -1
  183. package/dist/packageMetadata.d.ts +2 -2
  184. package/dist/packageMetadata.mjs +4 -4
  185. package/dist/packageMetadata.mjs.map +1 -1
  186. package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
  187. package/dist/request/AuthenticationHeaderParser.mjs +55 -55
  188. package/dist/request/AuthenticationHeaderParser.mjs.map +1 -1
  189. package/dist/request/BaseAuthRequest.d.ts +43 -43
  190. package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
  191. package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
  192. package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
  193. package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
  194. package/dist/request/CommonEndSessionRequest.d.ts +21 -21
  195. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
  196. package/dist/request/CommonRefreshTokenRequest.d.ts +22 -23
  197. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  198. package/dist/request/CommonSilentFlowRequest.d.ts +20 -21
  199. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
  200. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
  201. package/dist/request/NativeRequest.d.ts +19 -19
  202. package/dist/request/NativeSignOutRequest.d.ts +5 -5
  203. package/dist/request/RequestParameterBuilder.d.ts +217 -217
  204. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  205. package/dist/request/RequestParameterBuilder.mjs +383 -382
  206. package/dist/request/RequestParameterBuilder.mjs.map +1 -1
  207. package/dist/request/RequestValidator.d.ts +33 -33
  208. package/dist/request/RequestValidator.mjs +81 -81
  209. package/dist/request/RequestValidator.mjs.map +1 -1
  210. package/dist/request/ScopeSet.d.ts +88 -88
  211. package/dist/request/ScopeSet.mjs +197 -197
  212. package/dist/request/ScopeSet.mjs.map +1 -1
  213. package/dist/request/StoreInCache.d.ts +8 -8
  214. package/dist/response/AuthenticationResult.d.ts +41 -41
  215. package/dist/response/AuthorizationCodePayload.d.ts +13 -13
  216. package/dist/response/DeviceCodeResponse.d.ts +25 -25
  217. package/dist/response/ExternalTokenResponse.d.ts +15 -15
  218. package/dist/response/IMDSBadResponse.d.ts +4 -4
  219. package/dist/response/ResponseHandler.d.ts +69 -67
  220. package/dist/response/ResponseHandler.d.ts.map +1 -1
  221. package/dist/response/ResponseHandler.mjs +339 -313
  222. package/dist/response/ResponseHandler.mjs.map +1 -1
  223. package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
  224. package/dist/response/ServerAuthorizationTokenResponse.d.ts +46 -46
  225. package/dist/telemetry/performance/IPerformanceClient.d.ts +51 -51
  226. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
  227. package/dist/telemetry/performance/PerformanceClient.d.ts +191 -191
  228. package/dist/telemetry/performance/PerformanceClient.mjs +409 -409
  229. package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
  230. package/dist/telemetry/performance/PerformanceEvent.d.ts +464 -464
  231. package/dist/telemetry/performance/PerformanceEvent.mjs +253 -253
  232. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  233. package/dist/telemetry/performance/StubPerformanceClient.d.ts +24 -24
  234. package/dist/telemetry/performance/StubPerformanceClient.mjs +76 -76
  235. package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
  236. package/dist/telemetry/server/ServerTelemetryManager.d.ts +66 -66
  237. package/dist/telemetry/server/ServerTelemetryManager.mjs +201 -201
  238. package/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
  239. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
  240. package/dist/url/IUri.d.ts +12 -12
  241. package/dist/url/UrlString.d.ts +48 -48
  242. package/dist/url/UrlString.mjs +161 -161
  243. package/dist/url/UrlString.mjs.map +1 -1
  244. package/dist/utils/Constants.d.ts +296 -365
  245. package/dist/utils/Constants.d.ts.map +1 -1
  246. package/dist/utils/Constants.mjs +309 -376
  247. package/dist/utils/Constants.mjs.map +1 -1
  248. package/dist/utils/FunctionWrappers.d.ts +27 -27
  249. package/dist/utils/FunctionWrappers.mjs +84 -84
  250. package/dist/utils/FunctionWrappers.mjs.map +1 -1
  251. package/dist/utils/MsalTypes.d.ts +6 -6
  252. package/dist/utils/ProtocolUtils.d.ts +42 -42
  253. package/dist/utils/ProtocolUtils.mjs +69 -69
  254. package/dist/utils/ProtocolUtils.mjs.map +1 -1
  255. package/dist/utils/StringUtils.d.ts +40 -40
  256. package/dist/utils/StringUtils.mjs +95 -95
  257. package/dist/utils/StringUtils.mjs.map +1 -1
  258. package/dist/utils/TimeUtils.d.ts +27 -27
  259. package/dist/utils/TimeUtils.mjs +45 -45
  260. package/dist/utils/TimeUtils.mjs.map +1 -1
  261. package/dist/utils/UrlUtils.d.ts +10 -10
  262. package/dist/utils/UrlUtils.mjs +44 -44
  263. package/dist/utils/UrlUtils.mjs.map +1 -1
  264. package/package.json +93 -92
  265. package/src/account/AccountInfo.ts +96 -0
  266. package/src/account/ClientInfo.ts +2 -3
  267. package/src/account/TokenClaims.ts +28 -0
  268. package/src/authority/Authority.ts +29 -2
  269. package/src/cache/CacheManager.ts +416 -114
  270. package/src/cache/entities/AccountEntity.ts +84 -33
  271. package/src/cache/entities/RefreshTokenEntity.ts +1 -3
  272. package/src/cache/utils/CacheHelpers.ts +1 -6
  273. package/src/cache/utils/CacheTypes.ts +11 -0
  274. package/src/client/AuthorizationCodeClient.ts +4 -5
  275. package/src/client/RefreshTokenClient.ts +3 -15
  276. package/src/client/SilentFlowClient.ts +1 -1
  277. package/src/constants/AADServerParamKeys.ts +56 -0
  278. package/src/crypto/PopTokenGenerator.ts +1 -1
  279. package/src/error/InteractionRequiredAuthError.ts +0 -2
  280. package/src/error/InteractionRequiredAuthErrorCodes.ts +0 -1
  281. package/src/index.ts +17 -5
  282. package/src/packageMetadata.ts +1 -1
  283. package/src/request/CommonRefreshTokenRequest.ts +0 -1
  284. package/src/request/CommonSilentFlowRequest.ts +0 -1
  285. package/src/request/RequestParameterBuilder.ts +7 -5
  286. package/src/response/ResponseHandler.ts +95 -27
  287. package/src/utils/Constants.ts +0 -72
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v14.4.1-beta.0 2023-11-14 */
1
+ /*! @azure/msal-common v14.5.0 2023-12-01 */
2
2
  'use strict';
3
3
  import { DEFAULT_CRYPTO_IMPLEMENTATION } from '../crypto/ICrypto.mjs';
4
4
  import { Logger, LogLevel } from '../logger/Logger.mjs';
@@ -10,102 +10,102 @@ import { ProtocolMode } from '../authority/ProtocolMode.mjs';
10
10
  import { createClientAuthError } from '../error/ClientAuthError.mjs';
11
11
  import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';
12
12
 
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);
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);
109
109
  }
110
110
 
111
111
  export { DEFAULT_SYSTEM_OPTIONS, buildClientConfiguration, isOidcProtocolMode };
@@ -1 +1 @@
1
- {"version":3,"file":"ClientConfiguration.mjs","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;;;;;;;;AAKA;AACA;AACA;AAGA;;;;;;;;;;;;;AA8BG,IAAA,aAAA,EAAA,SAAA,CAAA,YAAA;AAC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G,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
+ {"version":3,"file":"ClientConfiguration.mjs","sources":["../../src/config/ClientConfiguration.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAoBH;AACA,MAAM,gCAAgC,GAAG,GAAG,CAAC;AA0IhC,MAAA,sBAAsB,GAA4B;AAC3D,IAAA,yBAAyB,EAAE,gCAAgC;AAC3D,IAAA,oBAAoB,EAAE,KAAK;EAC7B;AAEF,MAAM,6BAA6B,GAA4B;IAC3D,cAAc,EAAE,MAAK;;KAEpB;AACD,IAAA,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,QAAQ,CAAC,IAAI;IACvB,aAAa,EAAE,SAAS,CAAC,YAAY;CACxC,CAAC;AAEF,MAAM,qBAAqB,GAA2B;AAClD,IAAA,yBAAyB,EAAE,KAAK;CACnC,CAAC;AAEF,MAAM,8BAA8B,GAAmB;AACnD,IAAA,MAAM,mBAAmB,GAAA;AACrB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,oBAAoB,GAAA;AACtB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;CACJ,CAAC;AAEF,MAAM,oBAAoB,GAAgB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AAY,EAAE,EAAE,GAAG,qBAAqB,EAAE,GAAG,gBAAgB,EAAE;AAC/D,QAAA,gBAAgB,EACZ,qBAAqB;AACrB,YAAA,IAAI,mBAAmB,CACnB,eAAe,CAAC,QAAQ,EACxB,6BAA6B,EAC7B,IAAI,MAAM,CAAC,aAAa,CAAC,CAC5B;QACL,gBAAgB,EACZ,qBAAqB,IAAI,8BAA8B;QAC3D,eAAe,EAAE,oBAAoB,IAAI,6BAA6B;QACtE,iBAAiB,EAAE,iBAAiB,IAAI,0BAA0B;AAClE,QAAA,WAAW,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,WAAW,EAAE;AACxD,QAAA,SAAS,EAAE,EAAE,GAAG,yBAAyB,EAAE,GAAG,SAAS,EAAE;QACzD,sBAAsB,EAAE,sBAAsB,IAAI,IAAI;QACtD,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;QAC5C,iBAAiB,EAAE,iBAAiB,IAAI,IAAI;KAC/C,CAAC;AACN,CAAC;AAED;;;AAGG;AACH,SAAS,gBAAgB,CAAC,WAAwB,EAAA;IAC9C,OAAO;AACH,QAAA,kBAAkB,EAAE,EAAE;AACtB,QAAA,iBAAiB,EAAE,2BAA2B;AAC9C,QAAA,0BAA0B,EAAE,KAAK;AACjC,QAAA,GAAG,WAAW;KACjB,CAAC;AACN,CAAC;AAED;;;AAGG;AACG,SAAU,kBAAkB,CAAC,MAA2B,EAAA;AAC1D,IAAA,QACI,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,YAAY,KAAK,YAAY,CAAC,IAAI,EACzE;AACN;;;;"}
@@ -0,0 +1,52 @@
1
+ export declare const CLIENT_ID = "client_id";
2
+ export declare const REDIRECT_URI = "redirect_uri";
3
+ export declare const RESPONSE_TYPE = "response_type";
4
+ export declare const RESPONSE_MODE = "response_mode";
5
+ export declare const GRANT_TYPE = "grant_type";
6
+ export declare const CLAIMS = "claims";
7
+ export declare const SCOPE = "scope";
8
+ export declare const ERROR = "error";
9
+ export declare const ERROR_DESCRIPTION = "error_description";
10
+ export declare const ACCESS_TOKEN = "access_token";
11
+ export declare const ID_TOKEN = "id_token";
12
+ export declare const REFRESH_TOKEN = "refresh_token";
13
+ export declare const EXPIRES_IN = "expires_in";
14
+ export declare const STATE = "state";
15
+ export declare const NONCE = "nonce";
16
+ export declare const PROMPT = "prompt";
17
+ export declare const SESSION_STATE = "session_state";
18
+ export declare const CLIENT_INFO = "client_info";
19
+ export declare const CODE = "code";
20
+ export declare const CODE_CHALLENGE = "code_challenge";
21
+ export declare const CODE_CHALLENGE_METHOD = "code_challenge_method";
22
+ export declare const CODE_VERIFIER = "code_verifier";
23
+ export declare const CLIENT_REQUEST_ID = "client-request-id";
24
+ export declare const X_CLIENT_SKU = "x-client-SKU";
25
+ export declare const X_CLIENT_VER = "x-client-VER";
26
+ export declare const X_CLIENT_OS = "x-client-OS";
27
+ export declare const X_CLIENT_CPU = "x-client-CPU";
28
+ export declare const X_CLIENT_CURR_TELEM = "x-client-current-telemetry";
29
+ export declare const X_CLIENT_LAST_TELEM = "x-client-last-telemetry";
30
+ export declare const X_MS_LIB_CAPABILITY = "x-ms-lib-capability";
31
+ export declare const X_APP_NAME = "x-app-name";
32
+ export declare const X_APP_VER = "x-app-ver";
33
+ export declare const POST_LOGOUT_URI = "post_logout_redirect_uri";
34
+ export declare const ID_TOKEN_HINT = "id_token_hint";
35
+ export declare const DEVICE_CODE = "device_code";
36
+ export declare const CLIENT_SECRET = "client_secret";
37
+ export declare const CLIENT_ASSERTION = "client_assertion";
38
+ export declare const CLIENT_ASSERTION_TYPE = "client_assertion_type";
39
+ export declare const TOKEN_TYPE = "token_type";
40
+ export declare const REQ_CNF = "req_cnf";
41
+ export declare const OBO_ASSERTION = "assertion";
42
+ export declare const REQUESTED_TOKEN_USE = "requested_token_use";
43
+ export declare const ON_BEHALF_OF = "on_behalf_of";
44
+ export declare const FOCI = "foci";
45
+ export declare const CCS_HEADER = "X-AnchorMailbox";
46
+ export declare const RETURN_SPA_CODE = "return_spa_code";
47
+ export declare const NATIVE_BROKER = "nativebroker";
48
+ export declare const LOGOUT_HINT = "logout_hint";
49
+ export declare const SID = "sid";
50
+ export declare const LOGIN_HINT = "login_hint";
51
+ export declare const DOMAIN_HINT = "domain_hint";
52
+ //# sourceMappingURL=AADServerParamKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AADServerParamKeys.d.ts","sourceRoot":"","sources":["../../src/constants/AADServerParamKeys.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,mBAAmB,+BAA+B,CAAC;AAChE,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAC7D,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAC5C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAC5C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,GAAG,QAAQ,CAAC;AACzB,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,WAAW,gBAAgB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /*! @azure/msal-common v14.5.0 2023-12-01 */
2
+ 'use strict';
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ const CLIENT_ID = "client_id";
8
+ const REDIRECT_URI = "redirect_uri";
9
+ const RESPONSE_TYPE = "response_type";
10
+ const RESPONSE_MODE = "response_mode";
11
+ const GRANT_TYPE = "grant_type";
12
+ const CLAIMS = "claims";
13
+ const SCOPE = "scope";
14
+ const ERROR = "error";
15
+ const ERROR_DESCRIPTION = "error_description";
16
+ const ACCESS_TOKEN = "access_token";
17
+ const ID_TOKEN = "id_token";
18
+ const REFRESH_TOKEN = "refresh_token";
19
+ const EXPIRES_IN = "expires_in";
20
+ const STATE = "state";
21
+ const NONCE = "nonce";
22
+ const PROMPT = "prompt";
23
+ const SESSION_STATE = "session_state";
24
+ const CLIENT_INFO = "client_info";
25
+ const CODE = "code";
26
+ const CODE_CHALLENGE = "code_challenge";
27
+ const CODE_CHALLENGE_METHOD = "code_challenge_method";
28
+ const CODE_VERIFIER = "code_verifier";
29
+ const CLIENT_REQUEST_ID = "client-request-id";
30
+ const X_CLIENT_SKU = "x-client-SKU";
31
+ const X_CLIENT_VER = "x-client-VER";
32
+ const X_CLIENT_OS = "x-client-OS";
33
+ const X_CLIENT_CPU = "x-client-CPU";
34
+ const X_CLIENT_CURR_TELEM = "x-client-current-telemetry";
35
+ const X_CLIENT_LAST_TELEM = "x-client-last-telemetry";
36
+ const X_MS_LIB_CAPABILITY = "x-ms-lib-capability";
37
+ const X_APP_NAME = "x-app-name";
38
+ const X_APP_VER = "x-app-ver";
39
+ const POST_LOGOUT_URI = "post_logout_redirect_uri";
40
+ const ID_TOKEN_HINT = "id_token_hint";
41
+ const DEVICE_CODE = "device_code";
42
+ const CLIENT_SECRET = "client_secret";
43
+ const CLIENT_ASSERTION = "client_assertion";
44
+ const CLIENT_ASSERTION_TYPE = "client_assertion_type";
45
+ const TOKEN_TYPE = "token_type";
46
+ const REQ_CNF = "req_cnf";
47
+ const OBO_ASSERTION = "assertion";
48
+ const REQUESTED_TOKEN_USE = "requested_token_use";
49
+ const ON_BEHALF_OF = "on_behalf_of";
50
+ const FOCI = "foci";
51
+ const CCS_HEADER = "X-AnchorMailbox";
52
+ const RETURN_SPA_CODE = "return_spa_code";
53
+ const NATIVE_BROKER = "nativebroker";
54
+ const LOGOUT_HINT = "logout_hint";
55
+ const SID = "sid";
56
+ const LOGIN_HINT = "login_hint";
57
+ const DOMAIN_HINT = "domain_hint";
58
+
59
+ export { ACCESS_TOKEN, CCS_HEADER, CLAIMS, CLIENT_ASSERTION, CLIENT_ASSERTION_TYPE, CLIENT_ID, CLIENT_INFO, CLIENT_REQUEST_ID, CLIENT_SECRET, CODE, CODE_CHALLENGE, CODE_CHALLENGE_METHOD, CODE_VERIFIER, DEVICE_CODE, DOMAIN_HINT, ERROR, ERROR_DESCRIPTION, EXPIRES_IN, FOCI, GRANT_TYPE, ID_TOKEN, ID_TOKEN_HINT, LOGIN_HINT, LOGOUT_HINT, NATIVE_BROKER, NONCE, OBO_ASSERTION, ON_BEHALF_OF, POST_LOGOUT_URI, PROMPT, REDIRECT_URI, REFRESH_TOKEN, REQUESTED_TOKEN_USE, REQ_CNF, RESPONSE_MODE, RESPONSE_TYPE, RETURN_SPA_CODE, SCOPE, SESSION_STATE, SID, STATE, TOKEN_TYPE, X_APP_NAME, X_APP_VER, X_CLIENT_CPU, X_CLIENT_CURR_TELEM, X_CLIENT_LAST_TELEM, X_CLIENT_OS, X_CLIENT_SKU, X_CLIENT_VER, X_MS_LIB_CAPABILITY };
60
+ //# sourceMappingURL=AADServerParamKeys.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AADServerParamKeys.mjs","sources":["../../src/constants/AADServerParamKeys.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;AAGG;AAEI,MAAM,SAAS,GAAG,YAAY;AAC9B,MAAM,YAAY,GAAG,eAAe;AACpC,MAAM,aAAa,GAAG,gBAAgB;AACtC,MAAM,aAAa,GAAG,gBAAgB;AACtC,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,MAAM,GAAG,SAAS;AACxB,MAAM,KAAK,GAAG,QAAQ;AACtB,M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G,kBAAkB;AAC1C,MAAM,aAAa,GAAG,eAAe;AACrC,MAAM,WAAW,GAAG,cAAc;AAClC,MAAM,GAAG,GAAG,MAAM;AAClB,MAAM,UAAU,GAAG,aAAa;AAChC,MAAM,WAAW,GAAG;;;;"}
@@ -1,59 +1,59 @@
1
- import { BaseAuthRequest } from "../request/BaseAuthRequest";
2
- import { ShrOptions, 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" | "shrOptions"> & {
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
- * Generates an JWK RSA S256 Thumbprint
35
- * @param request
36
- */
37
- getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>;
38
- /**
39
- * Removes cryptographic keypair from key store matching the keyId passed in
40
- * @param kid
41
- */
42
- removeTokenBindingKey(kid: string): Promise<boolean>;
43
- /**
44
- * Removes all cryptographic keys from IndexedDB storage
45
- */
46
- clearKeystore(): Promise<boolean>;
47
- /**
48
- * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.
49
- * @param accessToken
50
- */
51
- signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise<string>;
52
- /**
53
- * Returns the SHA-256 hash of an input string
54
- * @param plainText
55
- */
56
- hashString(plainText: string): Promise<string>;
57
- }
58
- export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto;
1
+ import { BaseAuthRequest } from "../request/BaseAuthRequest";
2
+ import { ShrOptions, 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" | "shrOptions"> & {
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
+ * Generates an JWK RSA S256 Thumbprint
35
+ * @param request
36
+ */
37
+ getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>;
38
+ /**
39
+ * Removes cryptographic keypair from key store matching the keyId passed in
40
+ * @param kid
41
+ */
42
+ removeTokenBindingKey(kid: string): Promise<boolean>;
43
+ /**
44
+ * Removes all cryptographic keys from IndexedDB storage
45
+ */
46
+ clearKeystore(): Promise<boolean>;
47
+ /**
48
+ * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid.
49
+ * @param accessToken
50
+ */
51
+ signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise<string>;
52
+ /**
53
+ * Returns the SHA-256 hash of an input string
54
+ * @param plainText
55
+ */
56
+ hashString(plainText: string): Promise<string>;
57
+ }
58
+ export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto;
59
59
  //# sourceMappingURL=ICrypto.d.ts.map
@@ -1,37 +1,37 @@
1
- /*! @azure/msal-common v14.4.1-beta.0 2023-11-14 */
1
+ /*! @azure/msal-common v14.5.0 2023-12-01 */
2
2
  'use strict';
3
3
  import { createClientAuthError } from '../error/ClientAuthError.mjs';
4
4
  import { methodNotImplemented } from '../error/ClientAuthErrorCodes.mjs';
5
5
 
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 getPublicKeyThumbprint() {
21
- throw createClientAuthError(methodNotImplemented);
22
- },
23
- async removeTokenBindingKey() {
24
- throw createClientAuthError(methodNotImplemented);
25
- },
26
- async clearKeystore() {
27
- throw createClientAuthError(methodNotImplemented);
28
- },
29
- async signJwt() {
30
- throw createClientAuthError(methodNotImplemented);
31
- },
32
- async hashString() {
33
- throw createClientAuthError(methodNotImplemented);
34
- },
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 getPublicKeyThumbprint() {
21
+ throw createClientAuthError(methodNotImplemented);
22
+ },
23
+ async removeTokenBindingKey() {
24
+ throw createClientAuthError(methodNotImplemented);
25
+ },
26
+ async clearKeystore() {
27
+ throw createClientAuthError(methodNotImplemented);
28
+ },
29
+ async signJwt() {
30
+ throw createClientAuthError(methodNotImplemented);
31
+ },
32
+ async hashString() {
33
+ throw createClientAuthError(methodNotImplemented);
34
+ },
35
35
  };
36
36
 
37
37
  export { DEFAULT_CRYPTO_IMPLEMENTATION };
@@ -1 +1 @@
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;IAQI,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,qBAAA,GAAA;;AAEG,KAAA;IACH,MAAa;AACb,QAAA,MAAA,qBAAA,CAAAA,oBAAA,CAAA,CAAA;;;AAGG,QAAA,MAAA,qBAAA,CAAAA,oBAAA,CAAA,CAAA;AACH,KAAA;AACA,IAAA,MAAA,UAAA,GAAA;;;AAGG;;;;"}
1
+ {"version":3,"file":"ICrypto.mjs","sources":["../../src/crypto/ICrypto.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.methodNotImplemented"],"mappings":";;;;;AAAA;;;AAGG;AAiFU,MAAA,6BAA6B,GAAY;IAClD,aAAa,EAAE,MAAa;AACxB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;IACD,YAAY,EAAE,MAAa;AACvB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;IACD,YAAY,EAAE,MAAa;AACvB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,sBAAsB,GAAA;AACxB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,qBAAqB,GAAA;AACvB,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,aAAa,GAAA;AACf,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,OAAO,GAAA;AACT,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;AACD,IAAA,MAAM,UAAU,GAAA;AACZ,QAAA,MAAM,qBAAqB,CAACA,oBAAyC,CAAC,CAAC;KAC1E;;;;;"}
@@ -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 { JsonWebTokenTypes } from "../utils/Constants";
2
- export type JoseHeaderOptions = {
3
- typ?: JsonWebTokenTypes;
4
- alg?: string;
5
- kid?: string;
6
- };
7
- /** @internal */
8
- export declare class JoseHeader {
9
- typ?: JsonWebTokenTypes;
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 { JsonWebTokenTypes } from "../utils/Constants";
2
+ export type JoseHeaderOptions = {
3
+ typ?: JsonWebTokenTypes;
4
+ alg?: string;
5
+ kid?: string;
6
+ };
7
+ /** @internal */
8
+ export declare class JoseHeader {
9
+ typ?: JsonWebTokenTypes;
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