@azure/msal-common 13.0.0 → 14.0.0-alpha.2

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/dist/account/AccountInfo.d.ts +31 -31
  2. package/dist/account/AccountInfo.d.ts.map +1 -1
  3. package/dist/account/AuthToken.d.ts +20 -20
  4. package/dist/account/AuthToken.d.ts.map +1 -1
  5. package/dist/account/AuthToken.js +49 -50
  6. package/dist/account/AuthToken.js.map +1 -1
  7. package/dist/account/CcsCredential.d.ts +8 -8
  8. package/dist/account/CcsCredential.d.ts.map +1 -1
  9. package/dist/account/CcsCredential.js +9 -9
  10. package/dist/account/CcsCredential.js.map +1 -1
  11. package/dist/account/ClientCredentials.d.ts +14 -14
  12. package/dist/account/ClientCredentials.d.ts.map +1 -1
  13. package/dist/account/ClientInfo.d.ts +19 -19
  14. package/dist/account/ClientInfo.d.ts.map +1 -1
  15. package/dist/account/ClientInfo.js +37 -35
  16. package/dist/account/ClientInfo.js.map +1 -1
  17. package/dist/account/DecodedAuthToken.d.ts +8 -8
  18. package/dist/account/DecodedAuthToken.d.ts.map +1 -1
  19. package/dist/account/TokenClaims.d.ts +65 -65
  20. package/dist/account/TokenClaims.d.ts.map +1 -1
  21. package/dist/authority/Authority.d.ts +228 -215
  22. package/dist/authority/Authority.d.ts.map +1 -1
  23. package/dist/authority/Authority.js +717 -765
  24. package/dist/authority/Authority.js.map +1 -1
  25. package/dist/authority/AuthorityFactory.d.ts +30 -30
  26. package/dist/authority/AuthorityFactory.d.ts.map +1 -1
  27. package/dist/authority/AuthorityFactory.js +48 -63
  28. package/dist/authority/AuthorityFactory.js.map +1 -1
  29. package/dist/authority/AuthorityMetadata.d.ts +622 -622
  30. package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
  31. package/dist/authority/AuthorityMetadata.js +877 -8
  32. package/dist/authority/AuthorityMetadata.js.map +1 -1
  33. package/dist/authority/AuthorityOptions.d.ts +18 -18
  34. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  35. package/dist/authority/AuthorityOptions.js +19 -19
  36. package/dist/authority/AuthorityOptions.js.map +1 -1
  37. package/dist/authority/AuthorityType.d.ts +9 -9
  38. package/dist/authority/AuthorityType.js +14 -14
  39. package/dist/authority/AuthorityType.js.map +1 -1
  40. package/dist/authority/AzureRegion.d.ts +1 -1
  41. package/dist/authority/AzureRegion.d.ts.map +1 -1
  42. package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
  43. package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -1
  44. package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
  45. package/dist/authority/CloudDiscoveryMetadata.d.ts.map +1 -1
  46. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
  47. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -1
  48. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +8 -8
  49. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js.map +1 -1
  50. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
  51. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -1
  52. package/dist/authority/CloudInstanceDiscoveryResponse.js +8 -8
  53. package/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -1
  54. package/dist/authority/ImdsOptions.d.ts +5 -5
  55. package/dist/authority/ImdsOptions.d.ts.map +1 -1
  56. package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
  57. package/dist/authority/OpenIdConfigResponse.d.ts.map +1 -1
  58. package/dist/authority/OpenIdConfigResponse.js +10 -10
  59. package/dist/authority/OpenIdConfigResponse.js.map +1 -1
  60. package/dist/authority/ProtocolMode.d.ts +7 -7
  61. package/dist/authority/ProtocolMode.js +12 -12
  62. package/dist/authority/ProtocolMode.js.map +1 -1
  63. package/dist/authority/RegionDiscovery.d.ts +30 -30
  64. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  65. package/dist/authority/RegionDiscovery.js +110 -132
  66. package/dist/authority/RegionDiscovery.js.map +1 -1
  67. package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
  68. package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -1
  69. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
  70. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -1
  71. package/dist/cache/CacheManager.d.ts +443 -443
  72. package/dist/cache/CacheManager.d.ts.map +1 -1
  73. package/dist/cache/CacheManager.js +1012 -1047
  74. package/dist/cache/CacheManager.js.map +1 -1
  75. package/dist/cache/entities/AccessTokenEntity.d.ts +56 -56
  76. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
  77. package/dist/cache/entities/AccessTokenEntity.js +112 -113
  78. package/dist/cache/entities/AccessTokenEntity.js.map +1 -1
  79. package/dist/cache/entities/AccountEntity.d.ts +99 -99
  80. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  81. package/dist/cache/entities/AccountEntity.js +249 -237
  82. package/dist/cache/entities/AccountEntity.js.map +1 -1
  83. package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
  84. package/dist/cache/entities/AppMetadataEntity.d.ts.map +1 -1
  85. package/dist/cache/entities/AppMetadataEntity.js +67 -68
  86. package/dist/cache/entities/AppMetadataEntity.js.map +1 -1
  87. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +47 -47
  88. package/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -1
  89. package/dist/cache/entities/AuthorityMetadataEntity.js +78 -75
  90. package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -1
  91. package/dist/cache/entities/CacheRecord.d.ts +13 -13
  92. package/dist/cache/entities/CacheRecord.d.ts.map +1 -1
  93. package/dist/cache/entities/CacheRecord.js +14 -15
  94. package/dist/cache/entities/CacheRecord.js.map +1 -1
  95. package/dist/cache/entities/CredentialEntity.d.ts +88 -88
  96. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  97. package/dist/cache/entities/CredentialEntity.js +137 -136
  98. package/dist/cache/entities/CredentialEntity.js.map +1 -1
  99. package/dist/cache/entities/IdTokenEntity.d.ts +34 -34
  100. package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -1
  101. package/dist/cache/entities/IdTokenEntity.js +57 -63
  102. package/dist/cache/entities/IdTokenEntity.js.map +1 -1
  103. package/dist/cache/entities/RefreshTokenEntity.d.ts +36 -36
  104. package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -1
  105. package/dist/cache/entities/RefreshTokenEntity.js +60 -66
  106. package/dist/cache/entities/RefreshTokenEntity.js.map +1 -1
  107. package/dist/cache/entities/ServerTelemetryEntity.d.ts +12 -12
  108. package/dist/cache/entities/ServerTelemetryEntity.d.ts.map +1 -1
  109. package/dist/cache/entities/ServerTelemetryEntity.js +28 -29
  110. package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -1
  111. package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
  112. package/dist/cache/entities/ThrottlingEntity.js +24 -26
  113. package/dist/cache/entities/ThrottlingEntity.js.map +1 -1
  114. package/dist/cache/interface/ICacheManager.d.ts +165 -165
  115. package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
  116. package/dist/cache/interface/ICachePlugin.d.ts +5 -5
  117. package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
  118. package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
  119. package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -1
  120. package/dist/cache/persistence/TokenCacheContext.js +26 -35
  121. package/dist/cache/persistence/TokenCacheContext.js.map +1 -1
  122. package/dist/cache/utils/CacheTypes.d.ts +62 -62
  123. package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
  124. package/dist/client/AuthorizationCodeClient.d.ts +71 -71
  125. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  126. package/dist/client/AuthorizationCodeClient.js +435 -478
  127. package/dist/client/AuthorizationCodeClient.js.map +1 -1
  128. package/dist/client/BaseClient.d.ts +50 -50
  129. package/dist/client/BaseClient.d.ts.map +1 -1
  130. package/dist/client/BaseClient.js +93 -101
  131. package/dist/client/BaseClient.js.map +1 -1
  132. package/dist/client/RefreshTokenClient.d.ts +34 -34
  133. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  134. package/dist/client/RefreshTokenClient.js +241 -274
  135. package/dist/client/RefreshTokenClient.js.map +1 -1
  136. package/dist/client/SilentFlowClient.d.ts +24 -24
  137. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  138. package/dist/client/SilentFlowClient.js +95 -123
  139. package/dist/client/SilentFlowClient.js.map +1 -1
  140. package/dist/config/AppTokenProvider.d.ts +38 -38
  141. package/dist/config/AppTokenProvider.d.ts.map +1 -1
  142. package/dist/config/ClientConfiguration.d.ts +133 -133
  143. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  144. package/dist/config/ClientConfiguration.js +88 -91
  145. package/dist/config/ClientConfiguration.js.map +1 -1
  146. package/dist/crypto/ICrypto.d.ts +62 -62
  147. package/dist/crypto/ICrypto.d.ts.map +1 -1
  148. package/dist/crypto/ICrypto.js +42 -73
  149. package/dist/crypto/ICrypto.js.map +1 -1
  150. package/dist/crypto/IGuidGenerator.d.ts +4 -4
  151. package/dist/crypto/JoseHeader.d.ts +21 -21
  152. package/dist/crypto/JoseHeader.d.ts.map +1 -1
  153. package/dist/crypto/JoseHeader.js +37 -38
  154. package/dist/crypto/JoseHeader.js.map +1 -1
  155. package/dist/crypto/PopTokenGenerator.d.ts +57 -57
  156. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  157. package/dist/crypto/PopTokenGenerator.js +84 -108
  158. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  159. package/dist/crypto/SignedHttpRequest.d.ts +11 -11
  160. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  161. package/dist/error/AuthError.d.ts +47 -47
  162. package/dist/error/AuthError.d.ts.map +1 -1
  163. package/dist/error/AuthError.js +52 -55
  164. package/dist/error/AuthError.js.map +1 -1
  165. package/dist/error/ClientAuthError.d.ts +412 -404
  166. package/dist/error/ClientAuthError.d.ts.map +1 -1
  167. package/dist/error/ClientAuthError.js +520 -514
  168. package/dist/error/ClientAuthError.js.map +1 -1
  169. package/dist/error/ClientConfigurationError.d.ts +198 -198
  170. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  171. package/dist/error/ClientConfigurationError.js +250 -254
  172. package/dist/error/ClientConfigurationError.js.map +1 -1
  173. package/dist/error/InteractionRequiredAuthError.d.ts +59 -59
  174. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  175. package/dist/error/InteractionRequiredAuthError.js +79 -78
  176. package/dist/error/InteractionRequiredAuthError.js.map +1 -1
  177. package/dist/error/JoseHeaderError.d.ts +28 -28
  178. package/dist/error/JoseHeaderError.d.ts.map +1 -1
  179. package/dist/error/JoseHeaderError.js +40 -44
  180. package/dist/error/JoseHeaderError.js.map +1 -1
  181. package/dist/error/ServerError.d.ts +7 -7
  182. package/dist/error/ServerError.d.ts.map +1 -1
  183. package/dist/error/ServerError.js +15 -19
  184. package/dist/error/ServerError.js.map +1 -1
  185. package/dist/index.cjs.js +8890 -9111
  186. package/dist/index.cjs.js.map +1 -1
  187. package/dist/index.d.ts +93 -94
  188. package/dist/index.d.ts.map +1 -1
  189. package/dist/index.js +5 -6
  190. package/dist/index.js.map +1 -1
  191. package/dist/logger/Logger.d.ts +95 -95
  192. package/dist/logger/Logger.d.ts.map +1 -1
  193. package/dist/logger/Logger.js +198 -188
  194. package/dist/logger/Logger.js.map +1 -1
  195. package/dist/network/INetworkModule.d.ts +29 -29
  196. package/dist/network/INetworkModule.d.ts.map +1 -1
  197. package/dist/network/INetworkModule.js +14 -14
  198. package/dist/network/INetworkModule.js.map +1 -1
  199. package/dist/network/NetworkManager.d.ts +32 -31
  200. package/dist/network/NetworkManager.d.ts.map +1 -1
  201. package/dist/network/NetworkManager.js +34 -48
  202. package/dist/network/NetworkManager.js.map +1 -1
  203. package/dist/network/RequestThumbprint.d.ts +16 -16
  204. package/dist/network/RequestThumbprint.d.ts.map +1 -1
  205. package/dist/network/ThrottlingUtils.d.ts +41 -41
  206. package/dist/network/ThrottlingUtils.d.ts.map +1 -1
  207. package/dist/network/ThrottlingUtils.js +95 -94
  208. package/dist/network/ThrottlingUtils.js.map +1 -1
  209. package/dist/packageMetadata.d.ts +2 -2
  210. package/dist/packageMetadata.d.ts.map +1 -1
  211. package/dist/packageMetadata.js +4 -4
  212. package/dist/packageMetadata.js.map +1 -1
  213. package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
  214. package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -1
  215. package/dist/request/AuthenticationHeaderParser.js +56 -57
  216. package/dist/request/AuthenticationHeaderParser.js.map +1 -1
  217. package/dist/request/BaseAuthRequest.d.ts +37 -37
  218. package/dist/request/BaseAuthRequest.d.ts.map +1 -1
  219. package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
  220. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  221. package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
  222. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
  223. package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
  224. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
  225. package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
  226. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  227. package/dist/request/CommonEndSessionRequest.d.ts +21 -21
  228. package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
  229. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
  230. package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
  231. package/dist/request/CommonRefreshTokenRequest.d.ts +19 -19
  232. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  233. package/dist/request/CommonSilentFlowRequest.d.ts +18 -18
  234. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
  235. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
  236. package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
  237. package/dist/request/NativeRequest.d.ts +19 -19
  238. package/dist/request/NativeRequest.d.ts.map +1 -1
  239. package/dist/request/NativeSignOutRequest.d.ts +5 -5
  240. package/dist/request/NativeSignOutRequest.d.ts.map +1 -1
  241. package/dist/request/RequestParameterBuilder.d.ts +216 -216
  242. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  243. package/dist/request/RequestParameterBuilder.js +376 -378
  244. package/dist/request/RequestParameterBuilder.js.map +1 -1
  245. package/dist/request/RequestValidator.d.ts +33 -33
  246. package/dist/request/RequestValidator.d.ts.map +1 -1
  247. package/dist/request/RequestValidator.js +84 -89
  248. package/dist/request/RequestValidator.js.map +1 -1
  249. package/dist/request/ScopeSet.d.ts +88 -88
  250. package/dist/request/ScopeSet.d.ts.map +1 -1
  251. package/dist/request/ScopeSet.js +198 -198
  252. package/dist/request/ScopeSet.js.map +1 -1
  253. package/dist/response/AuthenticationResult.d.ts +39 -39
  254. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  255. package/dist/response/AuthorizationCodePayload.d.ts +13 -13
  256. package/dist/response/AuthorizationCodePayload.d.ts.map +1 -1
  257. package/dist/response/DeviceCodeResponse.d.ts +25 -25
  258. package/dist/response/DeviceCodeResponse.d.ts.map +1 -1
  259. package/dist/response/ExternalTokenResponse.d.ts +15 -15
  260. package/dist/response/ExternalTokenResponse.d.ts.map +1 -1
  261. package/dist/response/IMDSBadResponse.d.ts +4 -4
  262. package/dist/response/IMDSBadResponse.d.ts.map +1 -1
  263. package/dist/response/ResponseHandler.d.ts +72 -72
  264. package/dist/response/ResponseHandler.d.ts.map +1 -1
  265. package/dist/response/ResponseHandler.js +301 -286
  266. package/dist/response/ResponseHandler.js.map +1 -1
  267. package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
  268. package/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -1
  269. package/dist/response/ServerAuthorizationTokenResponse.d.ts +44 -44
  270. package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
  271. package/dist/telemetry/performance/IPerformanceClient.d.ts +42 -43
  272. package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
  273. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
  274. package/dist/telemetry/performance/PerformanceClient.d.ts +189 -197
  275. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  276. package/dist/telemetry/performance/PerformanceClient.js +407 -402
  277. package/dist/telemetry/performance/PerformanceClient.js.map +1 -1
  278. package/dist/telemetry/performance/PerformanceEvent.d.ts +439 -439
  279. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  280. package/dist/telemetry/performance/PerformanceEvent.js +227 -227
  281. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -1
  282. package/dist/telemetry/performance/StubPerformanceClient.d.ts +19 -17
  283. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  284. package/dist/telemetry/performance/StubPerformanceClient.js +37 -46
  285. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -1
  286. package/dist/telemetry/server/ServerTelemetryManager.d.ts +65 -66
  287. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  288. package/dist/telemetry/server/ServerTelemetryManager.js +199 -161
  289. package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -1
  290. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
  291. package/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -1
  292. package/dist/url/IUri.d.ts +12 -12
  293. package/dist/url/UrlString.d.ts +70 -70
  294. package/dist/url/UrlString.d.ts.map +1 -1
  295. package/dist/url/UrlString.js +243 -232
  296. package/dist/url/UrlString.js.map +1 -1
  297. package/dist/utils/Constants.d.ts +331 -331
  298. package/dist/utils/Constants.d.ts.map +1 -1
  299. package/dist/utils/Constants.js +374 -373
  300. package/dist/utils/Constants.js.map +1 -1
  301. package/dist/utils/MsalTypes.d.ts +6 -6
  302. package/dist/utils/MsalTypes.d.ts.map +1 -1
  303. package/dist/utils/ProtocolUtils.d.ts +42 -42
  304. package/dist/utils/ProtocolUtils.d.ts.map +1 -1
  305. package/dist/utils/ProtocolUtils.js +72 -69
  306. package/dist/utils/ProtocolUtils.js.map +1 -1
  307. package/dist/utils/StringUtils.d.ts +53 -53
  308. package/dist/utils/StringUtils.d.ts.map +1 -1
  309. package/dist/utils/StringUtils.js +125 -123
  310. package/dist/utils/StringUtils.js.map +1 -1
  311. package/dist/utils/TimeUtils.d.ts +27 -27
  312. package/dist/utils/TimeUtils.d.ts.map +1 -1
  313. package/dist/utils/TimeUtils.js +46 -49
  314. package/dist/utils/TimeUtils.js.map +1 -1
  315. package/package.json +10 -7
  316. package/dist/_virtual/_tslib.js +0 -90
  317. package/dist/_virtual/_tslib.js.map +0 -1
  318. package/dist/client/ClientCredentialClient.d.ts +0 -38
  319. package/dist/client/ClientCredentialClient.d.ts.map +0 -1
  320. package/dist/client/ClientCredentialClient.js +0 -203
  321. package/dist/client/ClientCredentialClient.js.map +0 -1
  322. package/dist/client/DeviceCodeClient.d.ts +0 -57
  323. package/dist/client/DeviceCodeClient.d.ts.map +0 -1
  324. package/dist/client/DeviceCodeClient.js +0 -250
  325. package/dist/client/DeviceCodeClient.js.map +0 -1
  326. package/dist/client/OnBehalfOfClient.d.ts +0 -51
  327. package/dist/client/OnBehalfOfClient.d.ts.map +0 -1
  328. package/dist/client/OnBehalfOfClient.js +0 -248
  329. package/dist/client/OnBehalfOfClient.js.map +0 -1
  330. package/dist/client/UsernamePasswordClient.d.ts +0 -29
  331. package/dist/client/UsernamePasswordClient.d.ts.map +0 -1
  332. package/dist/client/UsernamePasswordClient.js +0 -129
  333. package/dist/client/UsernamePasswordClient.js.map +0 -1
@@ -1,444 +1,444 @@
1
- import { AccountFilter, CredentialFilter, ValidCredentialType, AppMetadataFilter, AppMetadataCache, TokenKeys } from "./utils/CacheTypes";
2
- import { CacheRecord } from "./entities/CacheRecord";
3
- import { AccountEntity } from "./entities/AccountEntity";
4
- import { AccessTokenEntity } from "./entities/AccessTokenEntity";
5
- import { IdTokenEntity } from "./entities/IdTokenEntity";
6
- import { RefreshTokenEntity } from "./entities/RefreshTokenEntity";
7
- import { ICacheManager } from "./interface/ICacheManager";
8
- import { AccountInfo } from "../account/AccountInfo";
9
- import { AppMetadataEntity } from "./entities/AppMetadataEntity";
10
- import { ServerTelemetryEntity } from "./entities/ServerTelemetryEntity";
11
- import { ThrottlingEntity } from "./entities/ThrottlingEntity";
12
- import { ICrypto } from "../crypto/ICrypto";
13
- import { AuthorityMetadataEntity } from "./entities/AuthorityMetadataEntity";
14
- import { BaseAuthRequest } from "../request/BaseAuthRequest";
15
- import { Logger } from "../logger/Logger";
16
- /**
17
- * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.
18
- */
19
- export declare abstract class CacheManager implements ICacheManager {
20
- protected clientId: string;
21
- protected cryptoImpl: ICrypto;
22
- private commonLogger;
23
- constructor(clientId: string, cryptoImpl: ICrypto, logger: Logger);
24
- /**
25
- * fetch the account entity from the platform cache
26
- * @param accountKey
27
- */
28
- abstract getAccount(accountKey: string): AccountEntity | null;
29
- /**
30
- * set account entity in the platform cache
31
- * @param account
32
- */
33
- abstract setAccount(account: AccountEntity): void;
34
- /**
35
- * fetch the idToken entity from the platform cache
36
- * @param idTokenKey
37
- */
38
- abstract getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
39
- /**
40
- * set idToken entity to the platform cache
41
- * @param idToken
42
- */
43
- abstract setIdTokenCredential(idToken: IdTokenEntity): void;
44
- /**
45
- * fetch the idToken entity from the platform cache
46
- * @param accessTokenKey
47
- */
48
- abstract getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
49
- /**
50
- * set idToken entity to the platform cache
51
- * @param accessToken
52
- */
53
- abstract setAccessTokenCredential(accessToken: AccessTokenEntity): void;
54
- /**
55
- * fetch the idToken entity from the platform cache
56
- * @param refreshTokenKey
57
- */
58
- abstract getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
59
- /**
60
- * set idToken entity to the platform cache
61
- * @param refreshToken
62
- */
63
- abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
64
- /**
65
- * fetch appMetadata entity from the platform cache
66
- * @param appMetadataKey
67
- */
68
- abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
69
- /**
70
- * set appMetadata entity to the platform cache
71
- * @param appMetadata
72
- */
73
- abstract setAppMetadata(appMetadata: AppMetadataEntity): void;
74
- /**
75
- * fetch server telemetry entity from the platform cache
76
- * @param serverTelemetryKey
77
- */
78
- abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
79
- /**
80
- * set server telemetry entity to the platform cache
81
- * @param serverTelemetryKey
82
- * @param serverTelemetry
83
- */
84
- abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
85
- /**
86
- * fetch cloud discovery metadata entity from the platform cache
87
- * @param key
88
- */
89
- abstract getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
90
- /**
91
- *
92
- */
93
- abstract getAuthorityMetadataKeys(): Array<string>;
94
- /**
95
- * set cloud discovery metadata entity to the platform cache
96
- * @param key
97
- * @param value
98
- */
99
- abstract setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void;
100
- /**
101
- * fetch throttling entity from the platform cache
102
- * @param throttlingCacheKey
103
- */
104
- abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
105
- /**
106
- * set throttling entity to the platform cache
107
- * @param throttlingCacheKey
108
- * @param throttlingCache
109
- */
110
- abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
111
- /**
112
- * Function to remove an item from cache given its key.
113
- * @param key
114
- */
115
- abstract removeItem(key: string): void;
116
- /**
117
- * Function which returns boolean whether cache contains a specific key.
118
- * @param key
119
- */
120
- abstract containsKey(key: string, type?: string): boolean;
121
- /**
122
- * Function which retrieves all current keys from the cache.
123
- */
124
- abstract getKeys(): string[];
125
- /**
126
- * Function which retrieves all account keys from the cache
127
- */
128
- abstract getAccountKeys(): string[];
129
- /**
130
- * Function which retrieves all token keys from the cache
131
- */
132
- abstract getTokenKeys(): TokenKeys;
133
- /**
134
- * Function which clears cache.
135
- */
136
- abstract clear(): Promise<void>;
137
- /**
138
- * Function which updates an outdated credential cache key
139
- */
140
- abstract updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string;
141
- /**
142
- * Returns all accounts in cache
143
- */
144
- getAllAccounts(): AccountInfo[];
145
- /**
146
- * Gets accountInfo object based on provided filters
147
- */
148
- getAccountInfoFilteredBy(accountFilter: AccountFilter): AccountInfo | null;
149
- private getAccountInfoFromEntity;
150
- /**
151
- * saves a cache record
152
- * @param cacheRecord
153
- */
154
- saveCacheRecord(cacheRecord: CacheRecord): Promise<void>;
155
- /**
156
- * saves access token credential
157
- * @param credential
158
- */
159
- private saveAccessToken;
160
- /**
161
- * retrieve accounts matching all provided filters; if no filter is set, get all accounts
162
- * not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared
163
- * @param homeAccountId
164
- * @param environment
165
- * @param realm
166
- */
167
- getAccountsFilteredBy(accountFilter: AccountFilter): AccountEntity[];
168
- /**
169
- * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided
170
- * @param key
171
- * @param homeAccountId
172
- * @param tenantId
173
- * @returns
174
- */
175
- isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean;
176
- /**
177
- * Returns true if the given key matches our credential key schema.
178
- * @param key
179
- */
180
- isCredentialKey(key: string): boolean;
181
- /**
182
- * Returns whether or not the given credential entity matches the filter
183
- * @param entity
184
- * @param filter
185
- * @returns
186
- */
187
- credentialMatchesFilter(entity: ValidCredentialType, filter: CredentialFilter): boolean;
188
- /**
189
- * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata
190
- * @param filter
191
- */
192
- getAppMetadataFilteredBy(filter: AppMetadataFilter): AppMetadataCache;
193
- /**
194
- * Support function to help match appMetadata
195
- * @param environment
196
- * @param clientId
197
- */
198
- private getAppMetadataFilteredByInternal;
199
- /**
200
- * retrieve authorityMetadata that contains a matching alias
201
- * @param filter
202
- */
203
- getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null;
204
- /**
205
- * Removes all accounts and related tokens from cache.
206
- */
207
- removeAllAccounts(): Promise<void>;
208
- /**
209
- * Removes the account and related tokens for a given account key
210
- * @param account
211
- */
212
- removeAccount(accountKey: string): Promise<void>;
213
- /**
214
- * Removes credentials associated with the provided account
215
- * @param account
216
- */
217
- removeAccountContext(account: AccountEntity): Promise<void>;
218
- /**
219
- * returns a boolean if the given credential is removed
220
- * @param credential
221
- */
222
- removeAccessToken(key: string): Promise<void>;
223
- /**
224
- * Removes all app metadata objects from cache.
225
- */
226
- removeAppMetadata(): boolean;
227
- /**
228
- * Retrieve the cached credentials into a cacherecord
229
- * @param account
230
- * @param clientId
231
- * @param scopes
232
- * @param environment
233
- * @param authScheme
234
- */
235
- readCacheRecord(account: AccountInfo, request: BaseAuthRequest, environment: string): CacheRecord;
236
- /**
237
- * Retrieve AccountEntity from cache
238
- * @param account
239
- */
240
- readAccountFromCache(account: AccountInfo): AccountEntity | null;
241
- /**
242
- * Retrieve IdTokenEntity from cache
243
- * @param clientId
244
- * @param account
245
- * @param inputRealm
246
- */
247
- getIdToken(account: AccountInfo, tokenKeys?: TokenKeys): IdTokenEntity | null;
248
- /**
249
- * Gets all idTokens matching the given filter
250
- * @param filter
251
- * @returns
252
- */
253
- getIdTokensByFilter(filter: CredentialFilter, tokenKeys?: TokenKeys): IdTokenEntity[];
254
- /**
255
- * Validate the cache key against filter before retrieving and parsing cache value
256
- * @param key
257
- * @param filter
258
- * @returns
259
- */
260
- idTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean;
261
- /**
262
- * Removes idToken from the cache
263
- * @param key
264
- */
265
- removeIdToken(key: string): void;
266
- /**
267
- * Removes refresh token from the cache
268
- * @param key
269
- */
270
- removeRefreshToken(key: string): void;
271
- /**
272
- * Retrieve AccessTokenEntity from cache
273
- * @param clientId
274
- * @param account
275
- * @param scopes
276
- * @param authScheme
277
- */
278
- getAccessToken(account: AccountInfo, request: BaseAuthRequest, tokenKeys?: TokenKeys): AccessTokenEntity | null;
279
- /**
280
- * Validate the cache key against filter before retrieving and parsing cache value
281
- * @param key
282
- * @param filter
283
- * @param keyMustContainAllScopes
284
- * @returns
285
- */
286
- accessTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter, keyMustContainAllScopes: boolean): boolean;
287
- /**
288
- * Gets all access tokens matching the filter
289
- * @param filter
290
- * @returns
291
- */
292
- getAccessTokensByFilter(filter: CredentialFilter): AccessTokenEntity[];
293
- /**
294
- * Helper to retrieve the appropriate refresh token from cache
295
- * @param clientId
296
- * @param account
297
- * @param familyRT
298
- */
299
- getRefreshToken(account: AccountInfo, familyRT: boolean, tokenKeys?: TokenKeys): RefreshTokenEntity | null;
300
- /**
301
- * Validate the cache key against filter before retrieving and parsing cache value
302
- * @param key
303
- * @param filter
304
- */
305
- refreshTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean;
306
- /**
307
- * Retrieve AppMetadataEntity from cache
308
- */
309
- readAppMetadataFromCache(environment: string): AppMetadataEntity | null;
310
- /**
311
- * Return the family_id value associated with FOCI
312
- * @param environment
313
- * @param clientId
314
- */
315
- isAppMetadataFOCI(environment: string): boolean;
316
- /**
317
- * helper to match account ids
318
- * @param value
319
- * @param homeAccountId
320
- */
321
- private matchHomeAccountId;
322
- /**
323
- * helper to match account ids
324
- * @param entity
325
- * @param localAccountId
326
- * @returns
327
- */
328
- private matchLocalAccountId;
329
- /**
330
- * helper to match usernames
331
- * @param entity
332
- * @param username
333
- * @returns
334
- */
335
- private matchUsername;
336
- /**
337
- * helper to match assertion
338
- * @param value
339
- * @param oboAssertion
340
- */
341
- private matchUserAssertionHash;
342
- /**
343
- * helper to match environment
344
- * @param value
345
- * @param environment
346
- */
347
- private matchEnvironment;
348
- /**
349
- * helper to match credential type
350
- * @param entity
351
- * @param credentialType
352
- */
353
- private matchCredentialType;
354
- /**
355
- * helper to match client ids
356
- * @param entity
357
- * @param clientId
358
- */
359
- private matchClientId;
360
- /**
361
- * helper to match family ids
362
- * @param entity
363
- * @param familyId
364
- */
365
- private matchFamilyId;
366
- /**
367
- * helper to match realm
368
- * @param entity
369
- * @param realm
370
- */
371
- private matchRealm;
372
- /**
373
- * helper to match nativeAccountId
374
- * @param entity
375
- * @param nativeAccountId
376
- * @returns boolean indicating the match result
377
- */
378
- private matchNativeAccountId;
379
- /**
380
- * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.
381
- * @param entity
382
- * @param target
383
- */
384
- private matchTarget;
385
- /**
386
- * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise
387
- * @param entity
388
- * @param tokenType
389
- */
390
- private matchTokenType;
391
- /**
392
- * Returns true if the credential's keyId matches the one in the request, false otherwise
393
- * @param entity
394
- * @param tokenType
395
- */
396
- private matchKeyId;
397
- /**
398
- * returns if a given cache entity is of the type appmetadata
399
- * @param key
400
- */
401
- private isAppMetadata;
402
- /**
403
- * returns if a given cache entity is of the type authoritymetadata
404
- * @param key
405
- */
406
- protected isAuthorityMetadata(key: string): boolean;
407
- /**
408
- * returns cache key used for cloud instance metadata
409
- */
410
- generateAuthorityMetadataCacheKey(authority: string): string;
411
- /**
412
- * Helper to convert serialized data to object
413
- * @param obj
414
- * @param json
415
- */
416
- static toObject<T>(obj: T, json: object): T;
417
- }
418
- export declare class DefaultStorageClass extends CacheManager {
419
- setAccount(): void;
420
- getAccount(): AccountEntity;
421
- setIdTokenCredential(): void;
422
- getIdTokenCredential(): IdTokenEntity;
423
- setAccessTokenCredential(): void;
424
- getAccessTokenCredential(): AccessTokenEntity;
425
- setRefreshTokenCredential(): void;
426
- getRefreshTokenCredential(): RefreshTokenEntity;
427
- setAppMetadata(): void;
428
- getAppMetadata(): AppMetadataEntity;
429
- setServerTelemetry(): void;
430
- getServerTelemetry(): ServerTelemetryEntity;
431
- setAuthorityMetadata(): void;
432
- getAuthorityMetadata(): AuthorityMetadataEntity | null;
433
- getAuthorityMetadataKeys(): Array<string>;
434
- setThrottlingCache(): void;
435
- getThrottlingCache(): ThrottlingEntity;
436
- removeItem(): boolean;
437
- containsKey(): boolean;
438
- getKeys(): string[];
439
- getAccountKeys(): string[];
440
- getTokenKeys(): TokenKeys;
441
- clear(): Promise<void>;
442
- updateCredentialCacheKey(): string;
443
- }
1
+ import { AccountFilter, CredentialFilter, ValidCredentialType, AppMetadataFilter, AppMetadataCache, TokenKeys } from "./utils/CacheTypes";
2
+ import { CacheRecord } from "./entities/CacheRecord";
3
+ import { AccountEntity } from "./entities/AccountEntity";
4
+ import { AccessTokenEntity } from "./entities/AccessTokenEntity";
5
+ import { IdTokenEntity } from "./entities/IdTokenEntity";
6
+ import { RefreshTokenEntity } from "./entities/RefreshTokenEntity";
7
+ import { ICacheManager } from "./interface/ICacheManager";
8
+ import { AccountInfo } from "../account/AccountInfo";
9
+ import { AppMetadataEntity } from "./entities/AppMetadataEntity";
10
+ import { ServerTelemetryEntity } from "./entities/ServerTelemetryEntity";
11
+ import { ThrottlingEntity } from "./entities/ThrottlingEntity";
12
+ import { ICrypto } from "../crypto/ICrypto";
13
+ import { AuthorityMetadataEntity } from "./entities/AuthorityMetadataEntity";
14
+ import { BaseAuthRequest } from "../request/BaseAuthRequest";
15
+ import { Logger } from "../logger/Logger";
16
+ /**
17
+ * Interface class which implement cache storage functions used by MSAL to perform validity checks, and store tokens.
18
+ */
19
+ export declare abstract class CacheManager implements ICacheManager {
20
+ protected clientId: string;
21
+ protected cryptoImpl: ICrypto;
22
+ private commonLogger;
23
+ constructor(clientId: string, cryptoImpl: ICrypto, logger: Logger);
24
+ /**
25
+ * fetch the account entity from the platform cache
26
+ * @param accountKey
27
+ */
28
+ abstract getAccount(accountKey: string): AccountEntity | null;
29
+ /**
30
+ * set account entity in the platform cache
31
+ * @param account
32
+ */
33
+ abstract setAccount(account: AccountEntity): void;
34
+ /**
35
+ * fetch the idToken entity from the platform cache
36
+ * @param idTokenKey
37
+ */
38
+ abstract getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
39
+ /**
40
+ * set idToken entity to the platform cache
41
+ * @param idToken
42
+ */
43
+ abstract setIdTokenCredential(idToken: IdTokenEntity): void;
44
+ /**
45
+ * fetch the idToken entity from the platform cache
46
+ * @param accessTokenKey
47
+ */
48
+ abstract getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
49
+ /**
50
+ * set idToken entity to the platform cache
51
+ * @param accessToken
52
+ */
53
+ abstract setAccessTokenCredential(accessToken: AccessTokenEntity): void;
54
+ /**
55
+ * fetch the idToken entity from the platform cache
56
+ * @param refreshTokenKey
57
+ */
58
+ abstract getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
59
+ /**
60
+ * set idToken entity to the platform cache
61
+ * @param refreshToken
62
+ */
63
+ abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void;
64
+ /**
65
+ * fetch appMetadata entity from the platform cache
66
+ * @param appMetadataKey
67
+ */
68
+ abstract getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
69
+ /**
70
+ * set appMetadata entity to the platform cache
71
+ * @param appMetadata
72
+ */
73
+ abstract setAppMetadata(appMetadata: AppMetadataEntity): void;
74
+ /**
75
+ * fetch server telemetry entity from the platform cache
76
+ * @param serverTelemetryKey
77
+ */
78
+ abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
79
+ /**
80
+ * set server telemetry entity to the platform cache
81
+ * @param serverTelemetryKey
82
+ * @param serverTelemetry
83
+ */
84
+ abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
85
+ /**
86
+ * fetch cloud discovery metadata entity from the platform cache
87
+ * @param key
88
+ */
89
+ abstract getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
90
+ /**
91
+ *
92
+ */
93
+ abstract getAuthorityMetadataKeys(): Array<string>;
94
+ /**
95
+ * set cloud discovery metadata entity to the platform cache
96
+ * @param key
97
+ * @param value
98
+ */
99
+ abstract setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void;
100
+ /**
101
+ * fetch throttling entity from the platform cache
102
+ * @param throttlingCacheKey
103
+ */
104
+ abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
105
+ /**
106
+ * set throttling entity to the platform cache
107
+ * @param throttlingCacheKey
108
+ * @param throttlingCache
109
+ */
110
+ abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
111
+ /**
112
+ * Function to remove an item from cache given its key.
113
+ * @param key
114
+ */
115
+ abstract removeItem(key: string): void;
116
+ /**
117
+ * Function which returns boolean whether cache contains a specific key.
118
+ * @param key
119
+ */
120
+ abstract containsKey(key: string, type?: string): boolean;
121
+ /**
122
+ * Function which retrieves all current keys from the cache.
123
+ */
124
+ abstract getKeys(): string[];
125
+ /**
126
+ * Function which retrieves all account keys from the cache
127
+ */
128
+ abstract getAccountKeys(): string[];
129
+ /**
130
+ * Function which retrieves all token keys from the cache
131
+ */
132
+ abstract getTokenKeys(): TokenKeys;
133
+ /**
134
+ * Function which clears cache.
135
+ */
136
+ abstract clear(): Promise<void>;
137
+ /**
138
+ * Function which updates an outdated credential cache key
139
+ */
140
+ abstract updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string;
141
+ /**
142
+ * Returns all accounts in cache
143
+ */
144
+ getAllAccounts(): AccountInfo[];
145
+ /**
146
+ * Gets accountInfo object based on provided filters
147
+ */
148
+ getAccountInfoFilteredBy(accountFilter: AccountFilter): AccountInfo | null;
149
+ private getAccountInfoFromEntity;
150
+ /**
151
+ * saves a cache record
152
+ * @param cacheRecord
153
+ */
154
+ saveCacheRecord(cacheRecord: CacheRecord): Promise<void>;
155
+ /**
156
+ * saves access token credential
157
+ * @param credential
158
+ */
159
+ private saveAccessToken;
160
+ /**
161
+ * retrieve accounts matching all provided filters; if no filter is set, get all accounts
162
+ * not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared
163
+ * @param homeAccountId
164
+ * @param environment
165
+ * @param realm
166
+ */
167
+ getAccountsFilteredBy(accountFilter: AccountFilter): AccountEntity[];
168
+ /**
169
+ * Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided
170
+ * @param key
171
+ * @param homeAccountId
172
+ * @param tenantId
173
+ * @returns
174
+ */
175
+ isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean;
176
+ /**
177
+ * Returns true if the given key matches our credential key schema.
178
+ * @param key
179
+ */
180
+ isCredentialKey(key: string): boolean;
181
+ /**
182
+ * Returns whether or not the given credential entity matches the filter
183
+ * @param entity
184
+ * @param filter
185
+ * @returns
186
+ */
187
+ credentialMatchesFilter(entity: ValidCredentialType, filter: CredentialFilter): boolean;
188
+ /**
189
+ * retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata
190
+ * @param filter
191
+ */
192
+ getAppMetadataFilteredBy(filter: AppMetadataFilter): AppMetadataCache;
193
+ /**
194
+ * Support function to help match appMetadata
195
+ * @param environment
196
+ * @param clientId
197
+ */
198
+ private getAppMetadataFilteredByInternal;
199
+ /**
200
+ * retrieve authorityMetadata that contains a matching alias
201
+ * @param filter
202
+ */
203
+ getAuthorityMetadataByAlias(host: string): AuthorityMetadataEntity | null;
204
+ /**
205
+ * Removes all accounts and related tokens from cache.
206
+ */
207
+ removeAllAccounts(): Promise<void>;
208
+ /**
209
+ * Removes the account and related tokens for a given account key
210
+ * @param account
211
+ */
212
+ removeAccount(accountKey: string): Promise<void>;
213
+ /**
214
+ * Removes credentials associated with the provided account
215
+ * @param account
216
+ */
217
+ removeAccountContext(account: AccountEntity): Promise<void>;
218
+ /**
219
+ * returns a boolean if the given credential is removed
220
+ * @param credential
221
+ */
222
+ removeAccessToken(key: string): Promise<void>;
223
+ /**
224
+ * Removes all app metadata objects from cache.
225
+ */
226
+ removeAppMetadata(): boolean;
227
+ /**
228
+ * Retrieve the cached credentials into a cacherecord
229
+ * @param account
230
+ * @param clientId
231
+ * @param scopes
232
+ * @param environment
233
+ * @param authScheme
234
+ */
235
+ readCacheRecord(account: AccountInfo, request: BaseAuthRequest, environment: string): CacheRecord;
236
+ /**
237
+ * Retrieve AccountEntity from cache
238
+ * @param account
239
+ */
240
+ readAccountFromCache(account: AccountInfo): AccountEntity | null;
241
+ /**
242
+ * Retrieve IdTokenEntity from cache
243
+ * @param clientId
244
+ * @param account
245
+ * @param inputRealm
246
+ */
247
+ getIdToken(account: AccountInfo, tokenKeys?: TokenKeys): IdTokenEntity | null;
248
+ /**
249
+ * Gets all idTokens matching the given filter
250
+ * @param filter
251
+ * @returns
252
+ */
253
+ getIdTokensByFilter(filter: CredentialFilter, tokenKeys?: TokenKeys): IdTokenEntity[];
254
+ /**
255
+ * Validate the cache key against filter before retrieving and parsing cache value
256
+ * @param key
257
+ * @param filter
258
+ * @returns
259
+ */
260
+ idTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean;
261
+ /**
262
+ * Removes idToken from the cache
263
+ * @param key
264
+ */
265
+ removeIdToken(key: string): void;
266
+ /**
267
+ * Removes refresh token from the cache
268
+ * @param key
269
+ */
270
+ removeRefreshToken(key: string): void;
271
+ /**
272
+ * Retrieve AccessTokenEntity from cache
273
+ * @param clientId
274
+ * @param account
275
+ * @param scopes
276
+ * @param authScheme
277
+ */
278
+ getAccessToken(account: AccountInfo, request: BaseAuthRequest, tokenKeys?: TokenKeys): AccessTokenEntity | null;
279
+ /**
280
+ * Validate the cache key against filter before retrieving and parsing cache value
281
+ * @param key
282
+ * @param filter
283
+ * @param keyMustContainAllScopes
284
+ * @returns
285
+ */
286
+ accessTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter, keyMustContainAllScopes: boolean): boolean;
287
+ /**
288
+ * Gets all access tokens matching the filter
289
+ * @param filter
290
+ * @returns
291
+ */
292
+ getAccessTokensByFilter(filter: CredentialFilter): AccessTokenEntity[];
293
+ /**
294
+ * Helper to retrieve the appropriate refresh token from cache
295
+ * @param clientId
296
+ * @param account
297
+ * @param familyRT
298
+ */
299
+ getRefreshToken(account: AccountInfo, familyRT: boolean, tokenKeys?: TokenKeys): RefreshTokenEntity | null;
300
+ /**
301
+ * Validate the cache key against filter before retrieving and parsing cache value
302
+ * @param key
303
+ * @param filter
304
+ */
305
+ refreshTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean;
306
+ /**
307
+ * Retrieve AppMetadataEntity from cache
308
+ */
309
+ readAppMetadataFromCache(environment: string): AppMetadataEntity | null;
310
+ /**
311
+ * Return the family_id value associated with FOCI
312
+ * @param environment
313
+ * @param clientId
314
+ */
315
+ isAppMetadataFOCI(environment: string): boolean;
316
+ /**
317
+ * helper to match account ids
318
+ * @param value
319
+ * @param homeAccountId
320
+ */
321
+ private matchHomeAccountId;
322
+ /**
323
+ * helper to match account ids
324
+ * @param entity
325
+ * @param localAccountId
326
+ * @returns
327
+ */
328
+ private matchLocalAccountId;
329
+ /**
330
+ * helper to match usernames
331
+ * @param entity
332
+ * @param username
333
+ * @returns
334
+ */
335
+ private matchUsername;
336
+ /**
337
+ * helper to match assertion
338
+ * @param value
339
+ * @param oboAssertion
340
+ */
341
+ private matchUserAssertionHash;
342
+ /**
343
+ * helper to match environment
344
+ * @param value
345
+ * @param environment
346
+ */
347
+ private matchEnvironment;
348
+ /**
349
+ * helper to match credential type
350
+ * @param entity
351
+ * @param credentialType
352
+ */
353
+ private matchCredentialType;
354
+ /**
355
+ * helper to match client ids
356
+ * @param entity
357
+ * @param clientId
358
+ */
359
+ private matchClientId;
360
+ /**
361
+ * helper to match family ids
362
+ * @param entity
363
+ * @param familyId
364
+ */
365
+ private matchFamilyId;
366
+ /**
367
+ * helper to match realm
368
+ * @param entity
369
+ * @param realm
370
+ */
371
+ private matchRealm;
372
+ /**
373
+ * helper to match nativeAccountId
374
+ * @param entity
375
+ * @param nativeAccountId
376
+ * @returns boolean indicating the match result
377
+ */
378
+ private matchNativeAccountId;
379
+ /**
380
+ * Returns true if the target scopes are a subset of the current entity's scopes, false otherwise.
381
+ * @param entity
382
+ * @param target
383
+ */
384
+ private matchTarget;
385
+ /**
386
+ * Returns true if the credential's tokenType or Authentication Scheme matches the one in the request, false otherwise
387
+ * @param entity
388
+ * @param tokenType
389
+ */
390
+ private matchTokenType;
391
+ /**
392
+ * Returns true if the credential's keyId matches the one in the request, false otherwise
393
+ * @param entity
394
+ * @param tokenType
395
+ */
396
+ private matchKeyId;
397
+ /**
398
+ * returns if a given cache entity is of the type appmetadata
399
+ * @param key
400
+ */
401
+ private isAppMetadata;
402
+ /**
403
+ * returns if a given cache entity is of the type authoritymetadata
404
+ * @param key
405
+ */
406
+ protected isAuthorityMetadata(key: string): boolean;
407
+ /**
408
+ * returns cache key used for cloud instance metadata
409
+ */
410
+ generateAuthorityMetadataCacheKey(authority: string): string;
411
+ /**
412
+ * Helper to convert serialized data to object
413
+ * @param obj
414
+ * @param json
415
+ */
416
+ static toObject<T>(obj: T, json: object): T;
417
+ }
418
+ export declare class DefaultStorageClass extends CacheManager {
419
+ setAccount(): void;
420
+ getAccount(): AccountEntity;
421
+ setIdTokenCredential(): void;
422
+ getIdTokenCredential(): IdTokenEntity;
423
+ setAccessTokenCredential(): void;
424
+ getAccessTokenCredential(): AccessTokenEntity;
425
+ setRefreshTokenCredential(): void;
426
+ getRefreshTokenCredential(): RefreshTokenEntity;
427
+ setAppMetadata(): void;
428
+ getAppMetadata(): AppMetadataEntity;
429
+ setServerTelemetry(): void;
430
+ getServerTelemetry(): ServerTelemetryEntity;
431
+ setAuthorityMetadata(): void;
432
+ getAuthorityMetadata(): AuthorityMetadataEntity | null;
433
+ getAuthorityMetadataKeys(): Array<string>;
434
+ setThrottlingCache(): void;
435
+ getThrottlingCache(): ThrottlingEntity;
436
+ removeItem(): boolean;
437
+ containsKey(): boolean;
438
+ getKeys(): string[];
439
+ getAccountKeys(): string[];
440
+ getTokenKeys(): TokenKeys;
441
+ clear(): Promise<void>;
442
+ updateCredentialCacheKey(): string;
443
+ }
444
444
  //# sourceMappingURL=CacheManager.d.ts.map