@azure/msal-common 0.0.1-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 (333) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/_virtual/_tslib.js +90 -0
  4. package/dist/_virtual/_tslib.js.map +1 -0
  5. package/dist/account/AccountInfo.d.ts +30 -0
  6. package/dist/account/AccountInfo.d.ts.map +1 -0
  7. package/dist/account/AuthToken.d.ts +17 -0
  8. package/dist/account/AuthToken.d.ts.map +1 -0
  9. package/dist/account/AuthToken.js +43 -0
  10. package/dist/account/AuthToken.js.map +1 -0
  11. package/dist/account/CcsCredential.d.ts +9 -0
  12. package/dist/account/CcsCredential.d.ts.map +1 -0
  13. package/dist/account/CcsCredential.js +14 -0
  14. package/dist/account/CcsCredential.js.map +1 -0
  15. package/dist/account/ClientCredentials.d.ts +15 -0
  16. package/dist/account/ClientCredentials.d.ts.map +1 -0
  17. package/dist/account/ClientInfo.d.ts +20 -0
  18. package/dist/account/ClientInfo.d.ts.map +1 -0
  19. package/dist/account/ClientInfo.js +44 -0
  20. package/dist/account/ClientInfo.js.map +1 -0
  21. package/dist/account/DecodedAuthToken.d.ts +9 -0
  22. package/dist/account/DecodedAuthToken.d.ts.map +1 -0
  23. package/dist/account/TokenClaims.d.ts +60 -0
  24. package/dist/account/TokenClaims.d.ts.map +1 -0
  25. package/dist/authority/Authority.d.ts +200 -0
  26. package/dist/authority/Authority.d.ts.map +1 -0
  27. package/dist/authority/Authority.js +678 -0
  28. package/dist/authority/Authority.js.map +1 -0
  29. package/dist/authority/AuthorityFactory.d.ts +29 -0
  30. package/dist/authority/AuthorityFactory.d.ts.map +1 -0
  31. package/dist/authority/AuthorityFactory.js +69 -0
  32. package/dist/authority/AuthorityFactory.js.map +1 -0
  33. package/dist/authority/AuthorityMetadata.d.ts +623 -0
  34. package/dist/authority/AuthorityMetadata.d.ts.map +1 -0
  35. package/dist/authority/AuthorityMetadata.js +12 -0
  36. package/dist/authority/AuthorityMetadata.js.map +1 -0
  37. package/dist/authority/AuthorityOptions.d.ts +19 -0
  38. package/dist/authority/AuthorityOptions.d.ts.map +1 -0
  39. package/dist/authority/AuthorityOptions.js +24 -0
  40. package/dist/authority/AuthorityOptions.js.map +1 -0
  41. package/dist/authority/AuthorityType.d.ts +8 -0
  42. package/dist/authority/AuthorityType.d.ts.map +1 -0
  43. package/dist/authority/AuthorityType.js +17 -0
  44. package/dist/authority/AuthorityType.js.map +1 -0
  45. package/dist/authority/AzureRegion.d.ts +2 -0
  46. package/dist/authority/AzureRegion.d.ts.map +1 -0
  47. package/dist/authority/AzureRegionConfiguration.d.ts +6 -0
  48. package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -0
  49. package/dist/authority/CloudDiscoveryMetadata.d.ts +6 -0
  50. package/dist/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
  51. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
  52. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
  53. package/dist/authority/CloudInstanceDiscoveryResponse.js +13 -0
  54. package/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -0
  55. package/dist/authority/ImdsOptions.d.ts +7 -0
  56. package/dist/authority/ImdsOptions.d.ts.map +1 -0
  57. package/dist/authority/OpenIdConfigResponse.d.ts +12 -0
  58. package/dist/authority/OpenIdConfigResponse.d.ts.map +1 -0
  59. package/dist/authority/OpenIdConfigResponse.js +15 -0
  60. package/dist/authority/OpenIdConfigResponse.js.map +1 -0
  61. package/dist/authority/ProtocolMode.d.ts +8 -0
  62. package/dist/authority/ProtocolMode.d.ts.map +1 -0
  63. package/dist/authority/ProtocolMode.js +17 -0
  64. package/dist/authority/ProtocolMode.js.map +1 -0
  65. package/dist/authority/RegionDiscovery.d.ts +28 -0
  66. package/dist/authority/RegionDiscovery.d.ts.map +1 -0
  67. package/dist/authority/RegionDiscovery.js +127 -0
  68. package/dist/authority/RegionDiscovery.js.map +1 -0
  69. package/dist/authority/RegionDiscoveryMetadata.d.ts +7 -0
  70. package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
  71. package/dist/cache/CacheManager.d.ts +393 -0
  72. package/dist/cache/CacheManager.d.ts.map +1 -0
  73. package/dist/cache/CacheManager.js +885 -0
  74. package/dist/cache/CacheManager.js.map +1 -0
  75. package/dist/cache/entities/AccessTokenEntity.d.ts +57 -0
  76. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -0
  77. package/dist/cache/entities/AccessTokenEntity.js +124 -0
  78. package/dist/cache/entities/AccessTokenEntity.js.map +1 -0
  79. package/dist/cache/entities/AccountEntity.d.ts +100 -0
  80. package/dist/cache/entities/AccountEntity.d.ts.map +1 -0
  81. package/dist/cache/entities/AccountEntity.js +243 -0
  82. package/dist/cache/entities/AccountEntity.js.map +1 -0
  83. package/dist/cache/entities/AppMetadataEntity.d.ts +40 -0
  84. package/dist/cache/entities/AppMetadataEntity.d.ts.map +1 -0
  85. package/dist/cache/entities/AppMetadataEntity.js +74 -0
  86. package/dist/cache/entities/AppMetadataEntity.js.map +1 -0
  87. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +48 -0
  88. package/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
  89. package/dist/cache/entities/AuthorityMetadataEntity.js +82 -0
  90. package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -0
  91. package/dist/cache/entities/CacheRecord.d.ts +14 -0
  92. package/dist/cache/entities/CacheRecord.d.ts.map +1 -0
  93. package/dist/cache/entities/CacheRecord.js +19 -0
  94. package/dist/cache/entities/CacheRecord.js.map +1 -0
  95. package/dist/cache/entities/CredentialEntity.d.ts +94 -0
  96. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -0
  97. package/dist/cache/entities/CredentialEntity.js +164 -0
  98. package/dist/cache/entities/CredentialEntity.js.map +1 -0
  99. package/dist/cache/entities/IdTokenEntity.d.ts +35 -0
  100. package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -0
  101. package/dist/cache/entities/IdTokenEntity.js +70 -0
  102. package/dist/cache/entities/IdTokenEntity.js.map +1 -0
  103. package/dist/cache/entities/RefreshTokenEntity.d.ts +37 -0
  104. package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
  105. package/dist/cache/entities/RefreshTokenEntity.js +73 -0
  106. package/dist/cache/entities/RefreshTokenEntity.js.map +1 -0
  107. package/dist/cache/entities/ServerTelemetryEntity.d.ts +13 -0
  108. package/dist/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
  109. package/dist/cache/entities/ServerTelemetryEntity.js +35 -0
  110. package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -0
  111. package/dist/cache/entities/ThrottlingEntity.d.ts +14 -0
  112. package/dist/cache/entities/ThrottlingEntity.d.ts.map +1 -0
  113. package/dist/cache/entities/ThrottlingEntity.js +32 -0
  114. package/dist/cache/entities/ThrottlingEntity.js.map +1 -0
  115. package/dist/cache/interface/ICacheManager.d.ts +157 -0
  116. package/dist/cache/interface/ICacheManager.d.ts.map +1 -0
  117. package/dist/cache/interface/ICachePlugin.d.ts +6 -0
  118. package/dist/cache/interface/ICachePlugin.d.ts.map +1 -0
  119. package/dist/cache/interface/ISerializableTokenCache.d.ts +5 -0
  120. package/dist/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
  121. package/dist/cache/persistence/TokenCacheContext.d.ts +24 -0
  122. package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -0
  123. package/dist/cache/persistence/TokenCacheContext.js +39 -0
  124. package/dist/cache/persistence/TokenCacheContext.js.map +1 -0
  125. package/dist/cache/utils/CacheTypes.d.ts +60 -0
  126. package/dist/cache/utils/CacheTypes.d.ts.map +1 -0
  127. package/dist/client/AuthorizationCodeClient.d.ts +76 -0
  128. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -0
  129. package/dist/client/AuthorizationCodeClient.js +468 -0
  130. package/dist/client/AuthorizationCodeClient.js.map +1 -0
  131. package/dist/client/BaseClient.d.ts +45 -0
  132. package/dist/client/BaseClient.d.ts.map +1 -0
  133. package/dist/client/BaseClient.js +103 -0
  134. package/dist/client/BaseClient.js.map +1 -0
  135. package/dist/client/ClientCredentialClient.d.ts +39 -0
  136. package/dist/client/ClientCredentialClient.d.ts.map +1 -0
  137. package/dist/client/ClientCredentialClient.js +202 -0
  138. package/dist/client/ClientCredentialClient.js.map +1 -0
  139. package/dist/client/DeviceCodeClient.d.ts +52 -0
  140. package/dist/client/DeviceCodeClient.d.ts.map +1 -0
  141. package/dist/client/DeviceCodeClient.js +232 -0
  142. package/dist/client/DeviceCodeClient.js.map +1 -0
  143. package/dist/client/OnBehalfOfClient.d.ts +51 -0
  144. package/dist/client/OnBehalfOfClient.d.ts.map +1 -0
  145. package/dist/client/OnBehalfOfClient.js +244 -0
  146. package/dist/client/OnBehalfOfClient.js.map +1 -0
  147. package/dist/client/RefreshTokenClient.d.ts +40 -0
  148. package/dist/client/RefreshTokenClient.d.ts.map +1 -0
  149. package/dist/client/RefreshTokenClient.js +255 -0
  150. package/dist/client/RefreshTokenClient.js.map +1 -0
  151. package/dist/client/SilentFlowClient.d.ts +25 -0
  152. package/dist/client/SilentFlowClient.d.ts.map +1 -0
  153. package/dist/client/SilentFlowClient.js +128 -0
  154. package/dist/client/SilentFlowClient.js.map +1 -0
  155. package/dist/client/UsernamePasswordClient.d.ts +29 -0
  156. package/dist/client/UsernamePasswordClient.d.ts.map +1 -0
  157. package/dist/client/UsernamePasswordClient.js +120 -0
  158. package/dist/client/UsernamePasswordClient.js.map +1 -0
  159. package/dist/config/AppTokenProvider.d.ts +39 -0
  160. package/dist/config/AppTokenProvider.d.ts.map +1 -0
  161. package/dist/config/ClientConfiguration.d.ts +135 -0
  162. package/dist/config/ClientConfiguration.d.ts.map +1 -0
  163. package/dist/config/ClientConfiguration.js +105 -0
  164. package/dist/config/ClientConfiguration.js.map +1 -0
  165. package/dist/crypto/ICrypto.d.ts +63 -0
  166. package/dist/crypto/ICrypto.d.ts.map +1 -0
  167. package/dist/crypto/ICrypto.js +80 -0
  168. package/dist/crypto/ICrypto.js.map +1 -0
  169. package/dist/crypto/IGuidGenerator.d.ts +5 -0
  170. package/dist/crypto/IGuidGenerator.d.ts.map +1 -0
  171. package/dist/crypto/JoseHeader.d.ts +22 -0
  172. package/dist/crypto/JoseHeader.d.ts.map +1 -0
  173. package/dist/crypto/JoseHeader.js +45 -0
  174. package/dist/crypto/JoseHeader.js.map +1 -0
  175. package/dist/crypto/PopTokenGenerator.d.ts +56 -0
  176. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -0
  177. package/dist/crypto/PopTokenGenerator.js +107 -0
  178. package/dist/crypto/PopTokenGenerator.js.map +1 -0
  179. package/dist/crypto/SignedHttpRequest.d.ts +12 -0
  180. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -0
  181. package/dist/error/AuthError.d.ts +48 -0
  182. package/dist/error/AuthError.d.ts.map +1 -0
  183. package/dist/error/AuthError.js +61 -0
  184. package/dist/error/AuthError.js.map +1 -0
  185. package/dist/error/ClientAuthError.d.ts +372 -0
  186. package/dist/error/ClientAuthError.d.ts.map +1 -0
  187. package/dist/error/ClientAuthError.js +477 -0
  188. package/dist/error/ClientAuthError.js.map +1 -0
  189. package/dist/error/ClientConfigurationError.d.ts +199 -0
  190. package/dist/error/ClientConfigurationError.d.ts.map +1 -0
  191. package/dist/error/ClientConfigurationError.js +260 -0
  192. package/dist/error/ClientConfigurationError.js.map +1 -0
  193. package/dist/error/InteractionRequiredAuthError.d.ts +42 -0
  194. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -0
  195. package/dist/error/InteractionRequiredAuthError.js +80 -0
  196. package/dist/error/InteractionRequiredAuthError.js.map +1 -0
  197. package/dist/error/JoseHeaderError.d.ts +29 -0
  198. package/dist/error/JoseHeaderError.d.ts.map +1 -0
  199. package/dist/error/JoseHeaderError.js +50 -0
  200. package/dist/error/JoseHeaderError.js.map +1 -0
  201. package/dist/error/ServerError.d.ts +8 -0
  202. package/dist/error/ServerError.d.ts.map +1 -0
  203. package/dist/error/ServerError.js +25 -0
  204. package/dist/error/ServerError.js.map +1 -0
  205. package/dist/index.cjs.js +8441 -0
  206. package/dist/index.cjs.js.map +1 -0
  207. package/dist/index.d.ts +90 -0
  208. package/dist/index.d.ts.map +1 -0
  209. package/dist/index.js +53 -0
  210. package/dist/index.js.map +1 -0
  211. package/dist/logger/Logger.d.ts +95 -0
  212. package/dist/logger/Logger.d.ts.map +1 -0
  213. package/dist/logger/Logger.js +185 -0
  214. package/dist/logger/Logger.js.map +1 -0
  215. package/dist/network/INetworkModule.d.ts +31 -0
  216. package/dist/network/INetworkModule.d.ts.map +1 -0
  217. package/dist/network/INetworkModule.js +21 -0
  218. package/dist/network/INetworkModule.js.map +1 -0
  219. package/dist/network/NetworkManager.d.ts +21 -0
  220. package/dist/network/NetworkManager.d.ts.map +1 -0
  221. package/dist/network/NetworkManager.js +56 -0
  222. package/dist/network/NetworkManager.js.map +1 -0
  223. package/dist/network/RequestThumbprint.d.ts +17 -0
  224. package/dist/network/RequestThumbprint.d.ts.map +1 -0
  225. package/dist/network/ThrottlingUtils.d.ts +42 -0
  226. package/dist/network/ThrottlingUtils.d.ts.map +1 -0
  227. package/dist/network/ThrottlingUtils.js +101 -0
  228. package/dist/network/ThrottlingUtils.js.map +1 -0
  229. package/dist/packageMetadata.d.ts +3 -0
  230. package/dist/packageMetadata.d.ts.map +1 -0
  231. package/dist/packageMetadata.js +8 -0
  232. package/dist/packageMetadata.js.map +1 -0
  233. package/dist/request/AuthenticationHeaderParser.d.ts +20 -0
  234. package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -0
  235. package/dist/request/AuthenticationHeaderParser.js +64 -0
  236. package/dist/request/AuthenticationHeaderParser.js.map +1 -0
  237. package/dist/request/BaseAuthRequest.d.ts +34 -0
  238. package/dist/request/BaseAuthRequest.d.ts.map +1 -0
  239. package/dist/request/CommonAuthorizationCodeRequest.d.ts +28 -0
  240. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
  241. package/dist/request/CommonAuthorizationUrlRequest.d.ts +51 -0
  242. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
  243. package/dist/request/CommonClientCredentialRequest.d.ts +17 -0
  244. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -0
  245. package/dist/request/CommonDeviceCodeRequest.d.ts +19 -0
  246. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -0
  247. package/dist/request/CommonEndSessionRequest.d.ts +21 -0
  248. package/dist/request/CommonEndSessionRequest.d.ts.map +1 -0
  249. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -0
  250. package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
  251. package/dist/request/CommonRefreshTokenRequest.d.ts +21 -0
  252. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -0
  253. package/dist/request/CommonSilentFlowRequest.d.ts +20 -0
  254. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -0
  255. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -0
  256. package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
  257. package/dist/request/RequestParameterBuilder.d.ts +217 -0
  258. package/dist/request/RequestParameterBuilder.d.ts.map +1 -0
  259. package/dist/request/RequestParameterBuilder.js +387 -0
  260. package/dist/request/RequestParameterBuilder.js.map +1 -0
  261. package/dist/request/RequestValidator.d.ts +34 -0
  262. package/dist/request/RequestValidator.d.ts.map +1 -0
  263. package/dist/request/RequestValidator.js +92 -0
  264. package/dist/request/RequestValidator.js.map +1 -0
  265. package/dist/request/ScopeSet.d.ts +83 -0
  266. package/dist/request/ScopeSet.d.ts.map +1 -0
  267. package/dist/request/ScopeSet.js +192 -0
  268. package/dist/request/ScopeSet.js.map +1 -0
  269. package/dist/response/AuthenticationResult.d.ts +38 -0
  270. package/dist/response/AuthenticationResult.d.ts.map +1 -0
  271. package/dist/response/AuthorizationCodePayload.d.ts +14 -0
  272. package/dist/response/AuthorizationCodePayload.d.ts.map +1 -0
  273. package/dist/response/DeviceCodeResponse.d.ts +26 -0
  274. package/dist/response/DeviceCodeResponse.d.ts.map +1 -0
  275. package/dist/response/ExternalTokenResponse.d.ts +15 -0
  276. package/dist/response/ExternalTokenResponse.d.ts.map +1 -0
  277. package/dist/response/IMDSBadResponse.d.ts +5 -0
  278. package/dist/response/IMDSBadResponse.d.ts.map +1 -0
  279. package/dist/response/ResponseHandler.d.ts +71 -0
  280. package/dist/response/ResponseHandler.d.ts.map +1 -0
  281. package/dist/response/ResponseHandler.js +293 -0
  282. package/dist/response/ResponseHandler.js.map +1 -0
  283. package/dist/response/ServerAuthorizationCodeResponse.d.ts +22 -0
  284. package/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
  285. package/dist/response/ServerAuthorizationTokenResponse.d.ts +43 -0
  286. package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
  287. package/dist/telemetry/performance/IPerformanceClient.d.ts +22 -0
  288. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
  289. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
  290. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
  291. package/dist/telemetry/performance/PerformanceClient.d.ts +125 -0
  292. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -0
  293. package/dist/telemetry/performance/PerformanceClient.js +281 -0
  294. package/dist/telemetry/performance/PerformanceClient.js.map +1 -0
  295. package/dist/telemetry/performance/PerformanceEvent.d.ts +249 -0
  296. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
  297. package/dist/telemetry/performance/PerformanceEvent.js +121 -0
  298. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -0
  299. package/dist/telemetry/performance/StubPerformanceClient.d.ts +13 -0
  300. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
  301. package/dist/telemetry/performance/StubPerformanceClient.js +37 -0
  302. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -0
  303. package/dist/telemetry/server/ServerTelemetryManager.d.ts +67 -0
  304. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
  305. package/dist/telemetry/server/ServerTelemetryManager.js +168 -0
  306. package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -0
  307. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
  308. package/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
  309. package/dist/url/IUri.d.ts +13 -0
  310. package/dist/url/IUri.d.ts.map +1 -0
  311. package/dist/url/UrlString.d.ts +62 -0
  312. package/dist/url/UrlString.d.ts.map +1 -0
  313. package/dist/url/UrlString.js +208 -0
  314. package/dist/url/UrlString.js.map +1 -0
  315. package/dist/utils/Constants.d.ts +340 -0
  316. package/dist/utils/Constants.d.ts.map +1 -0
  317. package/dist/utils/Constants.js +381 -0
  318. package/dist/utils/Constants.js.map +1 -0
  319. package/dist/utils/MsalTypes.d.ts +7 -0
  320. package/dist/utils/MsalTypes.d.ts.map +1 -0
  321. package/dist/utils/ProtocolUtils.d.ts +43 -0
  322. package/dist/utils/ProtocolUtils.d.ts.map +1 -0
  323. package/dist/utils/ProtocolUtils.js +77 -0
  324. package/dist/utils/ProtocolUtils.js.map +1 -0
  325. package/dist/utils/StringUtils.d.ts +54 -0
  326. package/dist/utils/StringUtils.d.ts.map +1 -0
  327. package/dist/utils/StringUtils.js +129 -0
  328. package/dist/utils/StringUtils.js.map +1 -0
  329. package/dist/utils/TimeUtils.d.ts +28 -0
  330. package/dist/utils/TimeUtils.d.ts.map +1 -0
  331. package/dist/utils/TimeUtils.js +53 -0
  332. package/dist/utils/TimeUtils.js.map +1 -0
  333. package/package.json +76 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThrottlingEntity.js","sources":["../../../src/cache/entities/ThrottlingEntity.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ThrottlingConstants } from \"../../utils/Constants\";\n\nexport class ThrottlingEntity {\n // Unix-time value representing the expiration of the throttle\n throttleTime: number;\n // Information provided by the server\n error?: string;\n errorCodes?: Array<string>;\n errorMessage?: string;\n subError?: string;\n\n /**\n * validates if a given cache entry is \"Throttling\", parses <key,value>\n * @param key\n * @param entity\n */\n static isThrottlingEntity(key: string, entity?: object): boolean {\n \n let validateKey: boolean = false;\n if (key) {\n validateKey = key.indexOf(ThrottlingConstants.THROTTLING_PREFIX) === 0;\n }\n \n let validateEntity: boolean = true;\n if (entity) {\n validateEntity = entity.hasOwnProperty(\"throttleTime\");\n }\n\n return validateKey && validateEntity;\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH,IAAA,gBAAA,kBAAA,YAAA;AAAA,IAAA,SAAA,gBAAA,GAAA;KA4BC;AAnBG;;;;AAIG;AACI,IAAA,gBAAA,CAAA,kBAAkB,GAAzB,UAA0B,GAAW,EAAE,MAAe,EAAA;QAElD,IAAI,WAAW,GAAY,KAAK,CAAC;AACjC,QAAA,IAAI,GAAG,EAAE;YACL,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC1E,SAAA;QAED,IAAI,cAAc,GAAY,IAAI,CAAC;AACnC,QAAA,IAAI,MAAM,EAAE;AACR,YAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAC1D,SAAA;QAED,OAAO,WAAW,IAAI,cAAc,CAAC;KACxC,CAAA;IACL,OAAC,gBAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
@@ -0,0 +1,157 @@
1
+ import { CredentialEntity } from "../entities/CredentialEntity";
2
+ import { AccountCache, CredentialCache, AccountFilter, CredentialFilter } from "../utils/CacheTypes";
3
+ import { CacheRecord } from "../entities/CacheRecord";
4
+ import { AccountEntity } from "../entities/AccountEntity";
5
+ import { AccountInfo } from "../../account/AccountInfo";
6
+ import { AppMetadataEntity } from "../entities/AppMetadataEntity";
7
+ import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity";
8
+ import { ThrottlingEntity } from "../entities/ThrottlingEntity";
9
+ import { IdTokenEntity } from "../entities/IdTokenEntity";
10
+ import { AccessTokenEntity } from "../entities/AccessTokenEntity";
11
+ import { RefreshTokenEntity } from "../entities/RefreshTokenEntity";
12
+ import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity";
13
+ export interface ICacheManager {
14
+ /**
15
+ * fetch the account entity from the platform cache
16
+ * @param accountKey
17
+ */
18
+ getAccount(accountKey: string): AccountEntity | null;
19
+ /**
20
+ * set account entity in the platform cache
21
+ * @param account
22
+ */
23
+ setAccount(account: AccountEntity): void;
24
+ /**
25
+ * fetch the idToken entity from the platform cache
26
+ * @param idTokenKey
27
+ */
28
+ getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
29
+ /**
30
+ * set idToken entity to the platform cache
31
+ * @param idToken
32
+ */
33
+ setIdTokenCredential(idToken: IdTokenEntity): void;
34
+ /**
35
+ * fetch the idToken entity from the platform cache
36
+ * @param accessTokenKey
37
+ */
38
+ getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
39
+ /**
40
+ * set idToken entity to the platform cache
41
+ * @param accessToken
42
+ */
43
+ setAccessTokenCredential(accessToken: AccessTokenEntity): void;
44
+ /**
45
+ * fetch the idToken entity from the platform cache
46
+ * @param refreshTokenKey
47
+ */
48
+ getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
49
+ /**
50
+ * set idToken entity to the platform cache
51
+ * @param refreshToken
52
+ */
53
+ setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
54
+ /**
55
+ * fetch appMetadata entity from the platform cache
56
+ * @param appMetadataKey
57
+ */
58
+ getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
59
+ /**
60
+ * set appMetadata entity to the platform cache
61
+ * @param appMetadata
62
+ */
63
+ setAppMetadata(appMetadata: AppMetadataEntity): void;
64
+ /**
65
+ * fetch server telemetry entity from the platform cache
66
+ * @param serverTelemetryKey
67
+ */
68
+ getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
69
+ /**
70
+ * set server telemetry entity to the platform cache
71
+ * @param serverTelemetryKey
72
+ * @param serverTelemetry
73
+ */
74
+ setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
75
+ /**
76
+ * fetch cloud discovery metadata entity from the platform cache
77
+ * @param key
78
+ */
79
+ getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
80
+ /**
81
+ * Get cache keys for authority metadata
82
+ */
83
+ getAuthorityMetadataKeys(): Array<string>;
84
+ /**
85
+ * set cloud discovery metadata entity to the platform cache
86
+ * @param key
87
+ * @param value
88
+ */
89
+ setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void;
90
+ /**
91
+ * Provide an alias to find a matching AuthorityMetadataEntity in cache
92
+ * @param host
93
+ */
94
+ getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null;
95
+ /**
96
+ * given an authority generates the cache key for authorityMetadata
97
+ * @param authority
98
+ */
99
+ generateAuthorityMetadataCacheKey(authority: string): string;
100
+ /**
101
+ * fetch throttling entity from the platform cache
102
+ * @param throttlingCacheKey
103
+ */
104
+ getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
105
+ /**
106
+ * set throttling entity to the platform cache
107
+ * @param throttlingCacheKey
108
+ * @param throttlingCache
109
+ */
110
+ setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
111
+ /**
112
+ * Returns all accounts in cache
113
+ */
114
+ getAllAccounts(): AccountInfo[];
115
+ /**
116
+ * saves a cache record
117
+ * @param cacheRecord
118
+ */
119
+ saveCacheRecord(cacheRecord: CacheRecord): Promise<void>;
120
+ /**
121
+ * retrieve accounts matching all provided filters; if no filter is set, get all accounts
122
+ * @param homeAccountId
123
+ * @param environment
124
+ * @param realm
125
+ */
126
+ getAccountsFilteredBy(filter: AccountFilter): AccountCache;
127
+ /**
128
+ * retrieve credentials matching all provided filters; if no filter is set, get all credentials
129
+ * @param homeAccountId
130
+ * @param environment
131
+ * @param credentialType
132
+ * @param clientId
133
+ * @param realm
134
+ * @param target
135
+ */
136
+ getCredentialsFilteredBy(filter: CredentialFilter): CredentialCache;
137
+ /**
138
+ * Removes all accounts and related tokens from cache.
139
+ */
140
+ removeAllAccounts(): Promise<boolean>;
141
+ /**
142
+ * returns a boolean if the given account is removed
143
+ * @param account
144
+ */
145
+ removeAccount(accountKey: string): Promise<boolean>;
146
+ /**
147
+ * returns a boolean if the given account is removed
148
+ * @param account
149
+ */
150
+ removeAccountContext(account: AccountEntity): Promise<boolean>;
151
+ /**
152
+ * returns a boolean if the given credential is removed
153
+ * @param credential
154
+ */
155
+ removeCredential(credential: CredentialEntity): Promise<boolean>;
156
+ }
157
+ //# sourceMappingURL=ICacheManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICacheManager.d.ts","sourceRoot":"","sources":["../../../src/cache/interface/ICacheManager.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import { TokenCacheContext } from "../persistence/TokenCacheContext";
2
+ export interface ICachePlugin {
3
+ beforeCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise<void>;
4
+ afterCacheAccess: (tokenCacheContext: TokenCacheContext) => Promise<void>;
5
+ }
6
+ //# sourceMappingURL=ICachePlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICachePlugin.d.ts","sourceRoot":"","sources":["../../../src/cache/interface/ICachePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,WAAW,YAAY;IACzB,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3E,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E"}
@@ -0,0 +1,5 @@
1
+ export interface ISerializableTokenCache {
2
+ deserialize: (cache: string) => void;
3
+ serialize: () => string;
4
+ }
5
+ //# sourceMappingURL=ISerializableTokenCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ISerializableTokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/interface/ISerializableTokenCache.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,24 @@
1
+ import { ISerializableTokenCache } from "../interface/ISerializableTokenCache";
2
+ /**
3
+ * This class instance helps track the memory changes facilitating
4
+ * decisions to read from and write to the persistent cache
5
+ */ export declare class TokenCacheContext {
6
+ /**
7
+ * boolean indicating cache change
8
+ */
9
+ hasChanged: boolean;
10
+ /**
11
+ * serializable token cache interface
12
+ */
13
+ cache: ISerializableTokenCache;
14
+ constructor(tokenCache: ISerializableTokenCache, hasChanged: boolean);
15
+ /**
16
+ * boolean which indicates the changes in cache
17
+ */
18
+ get cacheHasChanged(): boolean;
19
+ /**
20
+ * function to retrieve the token cache
21
+ */
22
+ get tokenCache(): ISerializableTokenCache;
23
+ }
24
+ //# sourceMappingURL=TokenCacheContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenCacheContext.d.ts","sourceRoot":"","sources":["../../../src/cache/persistence/TokenCacheContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;;GAGG,CAAA,qBAAa,iBAAiB;IAC7B;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;gBAEnB,UAAU,EAAE,uBAAuB,EAAE,UAAU,EAAE,OAAO;IAKpE;;OAEG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,uBAAuB,CAExC;CACJ"}
@@ -0,0 +1,39 @@
1
+ /*! @azure/msal-common v0.0.1-alpha.0 2022-08-02 */
2
+ 'use strict';
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ /**
8
+ * This class instance helps track the memory changes facilitating
9
+ * decisions to read from and write to the persistent cache
10
+ */ var TokenCacheContext = /** @class */ (function () {
11
+ function TokenCacheContext(tokenCache, hasChanged) {
12
+ this.cache = tokenCache;
13
+ this.hasChanged = hasChanged;
14
+ }
15
+ Object.defineProperty(TokenCacheContext.prototype, "cacheHasChanged", {
16
+ /**
17
+ * boolean which indicates the changes in cache
18
+ */
19
+ get: function () {
20
+ return this.hasChanged;
21
+ },
22
+ enumerable: false,
23
+ configurable: true
24
+ });
25
+ Object.defineProperty(TokenCacheContext.prototype, "tokenCache", {
26
+ /**
27
+ * function to retrieve the token cache
28
+ */
29
+ get: function () {
30
+ return this.cache;
31
+ },
32
+ enumerable: false,
33
+ configurable: true
34
+ });
35
+ return TokenCacheContext;
36
+ }());
37
+
38
+ export { TokenCacheContext };
39
+ //# sourceMappingURL=TokenCacheContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenCacheContext.js","sources":["../../../src/cache/persistence/TokenCacheContext.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISerializableTokenCache } from \"../interface/ISerializableTokenCache\";\n\n/**\n * This class instance helps track the memory changes facilitating\n * decisions to read from and write to the persistent cache\n */export class TokenCacheContext {\n /**\n * boolean indicating cache change\n */\n hasChanged: boolean;\n /**\n * serializable token cache interface\n */\n cache: ISerializableTokenCache;\n\n constructor(tokenCache: ISerializableTokenCache, hasChanged: boolean) {\n this.cache = tokenCache;\n this.hasChanged = hasChanged;\n }\n\n /**\n * boolean which indicates the changes in cache\n */\n get cacheHasChanged(): boolean {\n return this.hasChanged;\n }\n\n /**\n * function to retrieve the token cache\n */\n get tokenCache(): ISerializableTokenCache {\n return this.cache;\n }\n}\n"],"names":[],"mappings":";;AAAA;;;AAGG;AAIH;;;IAGG,IAAA,iBAAA,kBAAA,YAAA;IAUC,SAAY,iBAAA,CAAA,UAAmC,EAAE,UAAmB,EAAA;AAChE,QAAA,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;AACxB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;KAChC;AAKD,IAAA,MAAA,CAAA,cAAA,CAAI,iBAAe,CAAA,SAAA,EAAA,iBAAA,EAAA;AAHnB;;AAEG;AACH,QAAA,GAAA,EAAA,YAAA;YACI,OAAO,IAAI,CAAC,UAAU,CAAC;SAC1B;;;AAAA,KAAA,CAAA,CAAA;AAKD,IAAA,MAAA,CAAA,cAAA,CAAI,iBAAU,CAAA,SAAA,EAAA,YAAA,EAAA;AAHd;;AAEG;AACH,QAAA,GAAA,EAAA,YAAA;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;SACrB;;;AAAA,KAAA,CAAA,CAAA;IACL,OAAC,iBAAA,CAAA;AAAD,CAAC,EAAA;;;;"}
@@ -0,0 +1,60 @@
1
+ import { AccountEntity } from "../entities/AccountEntity";
2
+ import { IdTokenEntity } from "../entities/IdTokenEntity";
3
+ import { AccessTokenEntity } from "../entities/AccessTokenEntity";
4
+ import { RefreshTokenEntity } from "../entities/RefreshTokenEntity";
5
+ import { AppMetadataEntity } from "../entities/AppMetadataEntity";
6
+ import { ServerTelemetryEntity } from "../entities/ServerTelemetryEntity";
7
+ import { ThrottlingEntity } from "../entities/ThrottlingEntity";
8
+ import { AuthorityMetadataEntity } from "../entities/AuthorityMetadataEntity";
9
+ import { AuthenticationScheme } from "../../utils/Constants";
10
+ export declare type AccountCache = Record<string, AccountEntity>;
11
+ export declare type IdTokenCache = Record<string, IdTokenEntity>;
12
+ export declare type AccessTokenCache = Record<string, AccessTokenEntity>;
13
+ export declare type RefreshTokenCache = Record<string, RefreshTokenEntity>;
14
+ export declare type AppMetadataCache = Record<string, AppMetadataEntity>;
15
+ export declare type CredentialCache = {
16
+ idTokens: IdTokenCache;
17
+ accessTokens: AccessTokenCache;
18
+ refreshTokens: RefreshTokenCache;
19
+ };
20
+ /**
21
+ * Object type of all accepted cache types
22
+ */
23
+ export declare type ValidCacheType = AccountEntity | IdTokenEntity | AccessTokenEntity | RefreshTokenEntity | AppMetadataEntity | AuthorityMetadataEntity | ServerTelemetryEntity | ThrottlingEntity | string;
24
+ /**
25
+ * Object type of all credential types
26
+ */
27
+ export declare type ValidCredentialType = IdTokenEntity | AccessTokenEntity | RefreshTokenEntity;
28
+ /**
29
+ * Account: <home_account_id>-<environment>-<realm*>
30
+ */
31
+ export declare type AccountFilter = {
32
+ homeAccountId?: string;
33
+ environment?: string;
34
+ realm?: string;
35
+ nativeAccountId?: string;
36
+ };
37
+ /**
38
+ * Credential: <home_account_id*>-<environment>-<credential_type>-<client_id>-<realm*>-<target*>-<scheme*>
39
+ */
40
+ export declare type CredentialFilter = {
41
+ homeAccountId?: string;
42
+ environment?: string;
43
+ credentialType?: string;
44
+ clientId?: string;
45
+ familyId?: string;
46
+ realm?: string;
47
+ target?: string;
48
+ userAssertionHash?: string;
49
+ tokenType?: AuthenticationScheme;
50
+ keyId?: string;
51
+ requestedClaimsHash?: string;
52
+ };
53
+ /**
54
+ * AppMetadata: appmetadata-<environment>-<client_id>
55
+ */
56
+ export declare type AppMetadataFilter = {
57
+ environment?: string;
58
+ clientId?: string;
59
+ };
60
+ //# sourceMappingURL=CacheTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheTypes.d.ts","sourceRoot":"","sources":["../../../src/cache/utils/CacheTypes.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,oBAAY,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACzD,oBAAY,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACzD,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AACjE,oBAAY,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AACnE,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AACjE,oBAAY,eAAe,GAAG;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,aAAa,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,oBAAY,cAAc,GAAG,aAAa,GAAG,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,MAAM,CAAC;AAEtM;;GAEG;AACH,oBAAY,mBAAmB,GAAG,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEzF;;GAEG;AACH,oBAAY,aAAa,GAAG;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,gBAAgB,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { BaseClient } from "./BaseClient";
2
+ import { CommonAuthorizationUrlRequest } from "../request/CommonAuthorizationUrlRequest";
3
+ import { CommonAuthorizationCodeRequest } from "../request/CommonAuthorizationCodeRequest";
4
+ import { ClientConfiguration } from "../config/ClientConfiguration";
5
+ import { AuthenticationResult } from "../response/AuthenticationResult";
6
+ import { CommonEndSessionRequest } from "../request/CommonEndSessionRequest";
7
+ import { AuthorizationCodePayload } from "../response/AuthorizationCodePayload";
8
+ /**
9
+ * Oauth2.0 Authorization Code client
10
+ */
11
+ export declare class AuthorizationCodeClient extends BaseClient {
12
+ protected includeRedirectUri: boolean;
13
+ constructor(configuration: ClientConfiguration);
14
+ /**
15
+ * Creates the URL of the authorization request letting the user input credentials and consent to the
16
+ * application. The URL target the /authorize endpoint of the authority configured in the
17
+ * application object.
18
+ *
19
+ * Once the user inputs their credentials and consents, the authority will send a response to the redirect URI
20
+ * sent in the request and should contain an authorization code, which can then be used to acquire tokens via
21
+ * acquireToken(AuthorizationCodeRequest)
22
+ * @param request
23
+ */
24
+ getAuthCodeUrl(request: CommonAuthorizationUrlRequest): Promise<string>;
25
+ /**
26
+ * API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the
27
+ * authorization_code_grant
28
+ * @param request
29
+ */
30
+ acquireToken(request: CommonAuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise<AuthenticationResult>;
31
+ /**
32
+ * Handles the hash fragment response from public client code request. Returns a code response used by
33
+ * the client to exchange for a token in acquireToken.
34
+ * @param hashFragment
35
+ */
36
+ handleFragmentResponse(hashFragment: string, cachedState: string): AuthorizationCodePayload;
37
+ /**
38
+ * Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
39
+ * Default behaviour is to redirect the user to `window.location.href`.
40
+ * @param authorityUri
41
+ */
42
+ getLogoutUri(logoutRequest: CommonEndSessionRequest): string;
43
+ /**
44
+ * Executes POST request to token endpoint
45
+ * @param authority
46
+ * @param request
47
+ */
48
+ private executeTokenRequest;
49
+ /**
50
+ * Creates query string for the /token request
51
+ * @param request
52
+ */
53
+ private createTokenQueryParameters;
54
+ /**
55
+ * Generates a map for all the params to be sent to the service
56
+ * @param request
57
+ */
58
+ private createTokenRequestBody;
59
+ /**
60
+ * This API validates the `AuthorizationCodeUrlRequest` and creates a URL
61
+ * @param request
62
+ */
63
+ private createAuthCodeUrlQueryString;
64
+ /**
65
+ * This API validates the `EndSessionRequest` and creates a URL
66
+ * @param request
67
+ */
68
+ private createLogoutUrlQueryString;
69
+ /**
70
+ * Helper to get sid from account. Returns null if idTokenClaims are not present or sid is not present.
71
+ * @param account
72
+ */
73
+ private extractAccountSid;
74
+ private extractLoginHint;
75
+ }
76
+ //# sourceMappingURL=AuthorizationCodeClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorizationCodeClient.d.ts","sourceRoot":"","sources":["../../src/client/AuthorizationCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAI3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAIpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAKxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAG7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAQhF;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,UAAU;IAEnD,SAAS,CAAC,kBAAkB,EAAE,OAAO,CAAQ;gBAEjC,aAAa,EAAE,mBAAmB;IAI9C;;;;;;;;;OASG;IACG,cAAc,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,MAAM,CAAC;IAM7E;;;;OAIG;IACG,YAAY,CAAC,OAAO,EAAE,8BAA8B,EAAE,eAAe,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAuBtI;;;;OAIG;IACH,sBAAsB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,wBAAwB;IAuB3F;;;;OAIG;IACH,YAAY,CAAC,aAAa,EAAE,uBAAuB,GAAG,MAAM;IAW5D;;;;OAIG;YACW,mBAAmB;IAiCjC;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;OAGG;YACW,sBAAsB;IAoHpC;;;OAGG;YACW,4BAA4B;IAiI1C;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IA8BlC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,gBAAgB;CAG3B"}