@azure/msal-common 14.0.3 → 14.1.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 (226) hide show
  1. package/dist/account/AccountInfo.d.ts +0 -1
  2. package/dist/account/AccountInfo.d.ts.map +1 -1
  3. package/dist/account/AuthToken.d.ts.map +1 -1
  4. package/dist/account/AuthToken.mjs +7 -6
  5. package/dist/account/AuthToken.mjs.map +1 -1
  6. package/dist/account/CcsCredential.mjs +1 -1
  7. package/dist/account/ClientInfo.d.ts.map +1 -1
  8. package/dist/account/ClientInfo.mjs +6 -5
  9. package/dist/account/ClientInfo.mjs.map +1 -1
  10. package/dist/authority/Authority.d.ts.map +1 -1
  11. package/dist/authority/Authority.mjs +28 -50
  12. package/dist/authority/Authority.mjs.map +1 -1
  13. package/dist/authority/AuthorityFactory.d.ts.map +1 -1
  14. package/dist/authority/AuthorityFactory.mjs +9 -7
  15. package/dist/authority/AuthorityFactory.mjs.map +1 -1
  16. package/dist/authority/AuthorityMetadata.mjs +1 -1
  17. package/dist/authority/AuthorityOptions.mjs +1 -1
  18. package/dist/authority/AuthorityType.mjs +1 -1
  19. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
  20. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
  21. package/dist/authority/OpenIdConfigResponse.mjs +1 -1
  22. package/dist/authority/ProtocolMode.mjs +1 -1
  23. package/dist/authority/RegionDiscovery.d.ts +3 -1
  24. package/dist/authority/RegionDiscovery.d.ts.map +1 -1
  25. package/dist/authority/RegionDiscovery.mjs +7 -8
  26. package/dist/authority/RegionDiscovery.mjs.map +1 -1
  27. package/dist/cache/CacheManager.d.ts +25 -7
  28. package/dist/cache/CacheManager.d.ts.map +1 -1
  29. package/dist/cache/CacheManager.mjs +98 -71
  30. package/dist/cache/CacheManager.mjs.map +1 -1
  31. package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
  32. package/dist/cache/entities/AccessTokenEntity.mjs +4 -3
  33. package/dist/cache/entities/AccessTokenEntity.mjs.map +1 -1
  34. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  35. package/dist/cache/entities/AccountEntity.mjs +4 -3
  36. package/dist/cache/entities/AccountEntity.mjs.map +1 -1
  37. package/dist/cache/entities/AppMetadataEntity.mjs +1 -1
  38. package/dist/cache/entities/AuthorityMetadataEntity.mjs +1 -1
  39. package/dist/cache/entities/CacheRecord.mjs +1 -1
  40. package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
  41. package/dist/cache/entities/CredentialEntity.mjs +4 -3
  42. package/dist/cache/entities/CredentialEntity.mjs.map +1 -1
  43. package/dist/cache/entities/IdTokenEntity.mjs +1 -1
  44. package/dist/cache/entities/RefreshTokenEntity.mjs +1 -1
  45. package/dist/cache/entities/ServerTelemetryEntity.mjs +1 -1
  46. package/dist/cache/entities/ThrottlingEntity.mjs +1 -1
  47. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  48. package/dist/cache/utils/CacheTypes.d.ts +3 -6
  49. package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
  50. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  51. package/dist/client/AuthorizationCodeClient.mjs +13 -11
  52. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  53. package/dist/client/BaseClient.d.ts.map +1 -1
  54. package/dist/client/BaseClient.mjs +5 -4
  55. package/dist/client/BaseClient.mjs.map +1 -1
  56. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  57. package/dist/client/RefreshTokenClient.mjs +33 -74
  58. package/dist/client/RefreshTokenClient.mjs.map +1 -1
  59. package/dist/client/SilentFlowClient.d.ts +2 -1
  60. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  61. package/dist/client/SilentFlowClient.mjs +43 -19
  62. package/dist/client/SilentFlowClient.mjs.map +1 -1
  63. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  64. package/dist/config/ClientConfiguration.mjs +5 -6
  65. package/dist/config/ClientConfiguration.mjs.map +1 -1
  66. package/dist/crypto/ICrypto.d.ts +0 -4
  67. package/dist/crypto/ICrypto.d.ts.map +1 -1
  68. package/dist/crypto/ICrypto.mjs +11 -22
  69. package/dist/crypto/ICrypto.mjs.map +1 -1
  70. package/dist/crypto/JoseHeader.d.ts.map +1 -1
  71. package/dist/crypto/JoseHeader.mjs +5 -4
  72. package/dist/crypto/JoseHeader.mjs.map +1 -1
  73. package/dist/crypto/PopTokenGenerator.d.ts +2 -1
  74. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  75. package/dist/crypto/PopTokenGenerator.mjs +4 -4
  76. package/dist/crypto/PopTokenGenerator.mjs.map +1 -1
  77. package/dist/error/AuthError.d.ts +8 -11
  78. package/dist/error/AuthError.d.ts.map +1 -1
  79. package/dist/error/AuthError.mjs +19 -21
  80. package/dist/error/AuthError.mjs.map +1 -1
  81. package/dist/error/AuthErrorCodes.d.ts +6 -0
  82. package/dist/error/AuthErrorCodes.d.ts.map +1 -0
  83. package/dist/error/AuthErrorCodes.mjs +14 -0
  84. package/dist/error/AuthErrorCodes.mjs.map +1 -0
  85. package/dist/error/ClientAuthError.d.ts +54 -234
  86. package/dist/error/ClientAuthError.d.ts.map +1 -1
  87. package/dist/error/ClientAuthError.mjs +149 -421
  88. package/dist/error/ClientAuthError.mjs.map +1 -1
  89. package/dist/error/ClientAuthErrorCodes.d.ts +44 -0
  90. package/dist/error/ClientAuthErrorCodes.d.ts.map +1 -0
  91. package/dist/error/ClientAuthErrorCodes.mjs +52 -0
  92. package/dist/error/ClientAuthErrorCodes.mjs.map +1 -0
  93. package/dist/error/ClientConfigurationError.d.ts +31 -125
  94. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  95. package/dist/error/ClientConfigurationError.mjs +81 -222
  96. package/dist/error/ClientConfigurationError.mjs.map +1 -1
  97. package/dist/error/ClientConfigurationErrorCodes.d.ts +23 -0
  98. package/dist/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
  99. package/dist/error/ClientConfigurationErrorCodes.mjs +31 -0
  100. package/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -0
  101. package/dist/error/InteractionRequiredAuthError.d.ts +14 -16
  102. package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
  103. package/dist/error/InteractionRequiredAuthError.mjs +42 -41
  104. package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
  105. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts +6 -0
  106. package/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
  107. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +16 -0
  108. package/dist/error/InteractionRequiredAuthErrorCodes.mjs.map +1 -0
  109. package/dist/error/JoseHeaderError.d.ts +7 -20
  110. package/dist/error/JoseHeaderError.d.ts.map +1 -1
  111. package/dist/error/JoseHeaderError.mjs +10 -26
  112. package/dist/error/JoseHeaderError.mjs.map +1 -1
  113. package/dist/error/JoseHeaderErrorCodes.d.ts +3 -0
  114. package/dist/error/JoseHeaderErrorCodes.d.ts.map +1 -0
  115. package/dist/error/JoseHeaderErrorCodes.mjs +11 -0
  116. package/dist/error/JoseHeaderErrorCodes.mjs.map +1 -0
  117. package/dist/error/ServerError.mjs +1 -1
  118. package/dist/index.cjs +942 -1210
  119. package/dist/index.cjs.map +1 -1
  120. package/dist/index.d.ts +5 -5
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.mjs +13 -5
  123. package/dist/index.mjs.map +1 -1
  124. package/dist/logger/Logger.mjs +1 -1
  125. package/dist/network/INetworkModule.d.ts.map +1 -1
  126. package/dist/network/INetworkModule.mjs +5 -6
  127. package/dist/network/INetworkModule.mjs.map +1 -1
  128. package/dist/network/NetworkManager.d.ts.map +1 -1
  129. package/dist/network/NetworkManager.mjs +4 -3
  130. package/dist/network/NetworkManager.mjs.map +1 -1
  131. package/dist/network/ThrottlingUtils.mjs +1 -1
  132. package/dist/packageMetadata.d.ts +1 -1
  133. package/dist/packageMetadata.mjs +2 -2
  134. package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -1
  135. package/dist/request/AuthenticationHeaderParser.mjs +7 -6
  136. package/dist/request/AuthenticationHeaderParser.mjs.map +1 -1
  137. package/dist/request/CommonRefreshTokenRequest.d.ts +3 -0
  138. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  139. package/dist/request/CommonSilentFlowRequest.d.ts +2 -0
  140. package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
  141. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  142. package/dist/request/RequestParameterBuilder.mjs +5 -4
  143. package/dist/request/RequestParameterBuilder.mjs.map +1 -1
  144. package/dist/request/RequestValidator.d.ts.map +1 -1
  145. package/dist/request/RequestValidator.mjs +8 -7
  146. package/dist/request/RequestValidator.mjs.map +1 -1
  147. package/dist/request/ScopeSet.d.ts.map +1 -1
  148. package/dist/request/ScopeSet.mjs +10 -8
  149. package/dist/request/ScopeSet.mjs.map +1 -1
  150. package/dist/response/ResponseHandler.d.ts.map +1 -1
  151. package/dist/response/ResponseHandler.mjs +15 -14
  152. package/dist/response/ResponseHandler.mjs.map +1 -1
  153. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  154. package/dist/telemetry/performance/PerformanceClient.mjs +3 -2
  155. package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
  156. package/dist/telemetry/performance/PerformanceEvent.d.ts +8 -0
  157. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  158. package/dist/telemetry/performance/PerformanceEvent.mjs +9 -1
  159. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  160. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  161. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  162. package/dist/telemetry/server/ServerTelemetryManager.mjs +2 -2
  163. package/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
  164. package/dist/url/UrlString.d.ts.map +1 -1
  165. package/dist/url/UrlString.mjs +13 -11
  166. package/dist/url/UrlString.mjs.map +1 -1
  167. package/dist/utils/Constants.d.ts +6 -3
  168. package/dist/utils/Constants.d.ts.map +1 -1
  169. package/dist/utils/Constants.mjs +12 -4
  170. package/dist/utils/Constants.mjs.map +1 -1
  171. package/dist/utils/FunctionWrappers.d.ts.map +1 -1
  172. package/dist/utils/FunctionWrappers.mjs +1 -2
  173. package/dist/utils/FunctionWrappers.mjs.map +1 -1
  174. package/dist/utils/ProtocolUtils.d.ts.map +1 -1
  175. package/dist/utils/ProtocolUtils.mjs +7 -6
  176. package/dist/utils/ProtocolUtils.mjs.map +1 -1
  177. package/dist/utils/StringUtils.mjs +1 -1
  178. package/dist/utils/TimeUtils.mjs +1 -1
  179. package/package.json +1 -1
  180. package/src/account/AccountInfo.ts +0 -1
  181. package/src/account/AuthToken.ts +8 -7
  182. package/src/account/ClientInfo.ts +9 -6
  183. package/src/authority/Authority.ts +76 -94
  184. package/src/authority/AuthorityFactory.ts +21 -9
  185. package/src/authority/RegionDiscovery.ts +21 -18
  186. package/src/cache/CacheManager.ts +133 -95
  187. package/src/cache/entities/AccessTokenEntity.ts +7 -2
  188. package/src/cache/entities/AccountEntity.ts +7 -2
  189. package/src/cache/entities/CredentialEntity.ts +7 -2
  190. package/src/cache/utils/CacheTypes.ts +6 -6
  191. package/src/client/AuthorizationCodeClient.ts +35 -11
  192. package/src/client/BaseClient.ts +7 -4
  193. package/src/client/RefreshTokenClient.ts +100 -126
  194. package/src/client/SilentFlowClient.ts +72 -19
  195. package/src/config/ClientConfiguration.ts +6 -7
  196. package/src/crypto/ICrypto.ts +12 -34
  197. package/src/crypto/JoseHeader.ts +6 -3
  198. package/src/crypto/PopTokenGenerator.ts +10 -5
  199. package/src/error/AuthError.ts +24 -26
  200. package/src/error/AuthErrorCodes.ts +10 -0
  201. package/src/error/ClientAuthError.ts +227 -632
  202. package/src/error/ClientAuthErrorCodes.ts +51 -0
  203. package/src/error/ClientConfigurationError.ts +146 -332
  204. package/src/error/ClientConfigurationErrorCodes.ts +28 -0
  205. package/src/error/InteractionRequiredAuthError.ts +60 -55
  206. package/src/error/InteractionRequiredAuthErrorCodes.ts +13 -0
  207. package/src/error/JoseHeaderError.ts +11 -31
  208. package/src/error/JoseHeaderErrorCodes.ts +7 -0
  209. package/src/index.ts +13 -1
  210. package/src/network/INetworkModule.ts +10 -7
  211. package/src/network/NetworkManager.ts +5 -5
  212. package/src/packageMetadata.ts +1 -1
  213. package/src/request/AuthenticationHeaderParser.ts +11 -8
  214. package/src/request/CommonRefreshTokenRequest.ts +3 -0
  215. package/src/request/CommonSilentFlowRequest.ts +2 -0
  216. package/src/request/RequestParameterBuilder.ts +10 -3
  217. package/src/request/RequestValidator.ts +19 -6
  218. package/src/request/ScopeSet.ts +23 -7
  219. package/src/response/ResponseHandler.ts +37 -17
  220. package/src/telemetry/performance/PerformanceClient.ts +2 -1
  221. package/src/telemetry/performance/PerformanceEvent.ts +9 -0
  222. package/src/telemetry/server/ServerTelemetryManager.ts +1 -1
  223. package/src/url/UrlString.ts +26 -16
  224. package/src/utils/Constants.ts +11 -3
  225. package/src/utils/FunctionWrappers.ts +0 -1
  226. package/src/utils/ProtocolUtils.ts +8 -12
@@ -1,7 +1,58 @@
1
1
  import { AuthError } from "./AuthError";
2
+ import * as ClientAuthErrorCodes from "./ClientAuthErrorCodes";
3
+ export { ClientAuthErrorCodes };
2
4
  /**
3
5
  * ClientAuthErrorMessage class containing string constants used by error codes and messages.
4
6
  */
7
+ export declare const ClientAuthErrorMessages: {
8
+ client_info_decoding_error: string;
9
+ client_info_empty_error: string;
10
+ token_parsing_error: string;
11
+ null_or_empty_token: string;
12
+ endpoints_resolution_error: string;
13
+ network_error: string;
14
+ openid_config_error: string;
15
+ hash_not_deserialized: string;
16
+ invalid_state: string;
17
+ state_mismatch: string;
18
+ state_not_found: string;
19
+ nonce_mismatch: string;
20
+ auth_time_not_found: string;
21
+ max_age_transpired: string;
22
+ multiple_matching_tokens: string;
23
+ multiple_matching_accounts: string;
24
+ multiple_matching_appMetadata: string;
25
+ request_cannot_be_made: string;
26
+ cannot_remove_empty_scope: string;
27
+ cannot_append_scopeset: string;
28
+ empty_input_scopeset: string;
29
+ device_code_polling_cancelled: string;
30
+ device_code_expired: string;
31
+ device_code_unknown_error: string;
32
+ no_account_in_silent_request: string;
33
+ invalid_cache_record: string;
34
+ invalid_cache_environment: string;
35
+ no_account_found: string;
36
+ no_crypto_object: string;
37
+ unexpected_credential_type: string;
38
+ invalid_assertion: string;
39
+ invalid_client_credential: string;
40
+ token_refresh_required: string;
41
+ user_timeout_reached: string;
42
+ token_claims_cnf_required_for_signedjwt: string;
43
+ authorization_code_missing_from_server_response: string;
44
+ binding_key_not_removed: string;
45
+ end_session_endpoint_not_supported: string;
46
+ key_id_missing: string;
47
+ no_network_connectivity: string;
48
+ user_canceled: string;
49
+ missing_tenant_id_error: string;
50
+ method_not_implemented: string;
51
+ };
52
+ /**
53
+ * String constants used by error codes and messages.
54
+ * @deprecated Use ClientAuthErrorCodes instead
55
+ */
5
56
  export declare const ClientAuthErrorMessage: {
6
57
  clientInfoDecodingError: {
7
58
  code: string;
@@ -35,10 +86,6 @@ export declare const ClientAuthErrorMessage: {
35
86
  code: string;
36
87
  desc: string;
37
88
  };
38
- blankGuidGenerated: {
39
- code: string;
40
- desc: string;
41
- };
42
89
  invalidStateError: {
43
90
  code: string;
44
91
  desc: string;
@@ -55,19 +102,11 @@ export declare const ClientAuthErrorMessage: {
55
102
  code: string;
56
103
  desc: string;
57
104
  };
58
- nonceNotFoundError: {
59
- code: string;
60
- desc: string;
61
- };
62
105
  authTimeNotFoundError: {
63
106
  code: string;
64
107
  desc: string;
65
108
  };
66
- maxAgeTranspiredError: {
67
- code: string;
68
- desc: string;
69
- };
70
- noTokensFoundError: {
109
+ maxAgeTranspired: {
71
110
  code: string;
72
111
  desc: string;
73
112
  };
@@ -87,10 +126,6 @@ export declare const ClientAuthErrorMessage: {
87
126
  code: string;
88
127
  desc: string;
89
128
  };
90
- appendEmptyScopeError: {
91
- code: string;
92
- desc: string;
93
- };
94
129
  removeEmptyScopeError: {
95
130
  code: string;
96
131
  desc: string;
@@ -131,22 +166,10 @@ export declare const ClientAuthErrorMessage: {
131
166
  code: string;
132
167
  desc: string;
133
168
  };
134
- CachePluginError: {
135
- code: string;
136
- desc: string;
137
- };
138
169
  noCryptoObj: {
139
170
  code: string;
140
171
  desc: string;
141
172
  };
142
- invalidCacheType: {
143
- code: string;
144
- desc: string;
145
- };
146
- unexpectedAccountType: {
147
- code: string;
148
- desc: string;
149
- };
150
173
  unexpectedCredentialType: {
151
174
  code: string;
152
175
  desc: string;
@@ -175,14 +198,6 @@ export declare const ClientAuthErrorMessage: {
175
198
  code: string;
176
199
  desc: string;
177
200
  };
178
- noAzureRegionDetected: {
179
- code: string;
180
- desc: string;
181
- };
182
- accessTokenEntityNullError: {
183
- code: string;
184
- desc: string;
185
- };
186
201
  bindingKeyNotRemovedError: {
187
202
  code: string;
188
203
  desc: string;
@@ -212,202 +227,7 @@ export declare const ClientAuthErrorMessage: {
212
227
  * Error thrown when there is an error in the client code running on the browser.
213
228
  */
214
229
  export declare class ClientAuthError extends AuthError {
215
- constructor(errorCode: string, errorMessage?: string);
216
- /**
217
- * Creates an error thrown when client info object doesn't decode correctly.
218
- * @param caughtError
219
- */
220
- static createClientInfoDecodingError(caughtError: string): ClientAuthError;
221
- /**
222
- * Creates an error thrown if the client info is empty.
223
- * @param rawClientInfo
224
- */
225
- static createClientInfoEmptyError(): ClientAuthError;
226
- /**
227
- * Creates an error thrown when the id token extraction errors out.
228
- * @param err
229
- */
230
- static createTokenParsingError(caughtExtractionError: string): ClientAuthError;
231
- /**
232
- * Creates an error thrown when the id token string is null or empty.
233
- * @param invalidRawTokenString
234
- */
235
- static createTokenNullOrEmptyError(invalidRawTokenString: string): ClientAuthError;
236
- /**
237
- * Creates an error thrown when the endpoint discovery doesn't complete correctly.
238
- */
239
- static createEndpointDiscoveryIncompleteError(errDetail: string): ClientAuthError;
240
- /**
241
- * Creates an error thrown when the fetch client throws
242
- */
243
- static createNetworkError(endpoint: string, errDetail: string): ClientAuthError;
244
- /**
245
- * Creates an error thrown when the openid-configuration endpoint cannot be reached or does not contain the required data
246
- */
247
- static createUnableToGetOpenidConfigError(errDetail: string): ClientAuthError;
248
- /**
249
- * Creates an error thrown when the hash cannot be deserialized.
250
- * @param hashParamObj
251
- */
252
- static createHashNotDeserializedError(hashParamObj: string): ClientAuthError;
253
- /**
254
- * Creates an error thrown when the state cannot be parsed.
255
- * @param invalidState
256
- */
257
- static createInvalidStateError(invalidState: string, errorString?: string): ClientAuthError;
258
- /**
259
- * Creates an error thrown when two states do not match.
260
- */
261
- static createStateMismatchError(): ClientAuthError;
262
- /**
263
- * Creates an error thrown when the state is not present
264
- * @param missingState
265
- */
266
- static createStateNotFoundError(missingState: string): ClientAuthError;
267
- /**
268
- * Creates an error thrown when the nonce does not match.
269
- */
270
- static createNonceMismatchError(): ClientAuthError;
271
- /**
272
- * Creates an error thrown when max_age was provided in the request, but auth_time is not in the token claims
273
- * @param missingNonce
274
- */
275
- static createAuthTimeNotFoundError(): ClientAuthError;
276
- /**
277
- * Creates an error thrown when too much time has elapsed since the last end-user authentication
278
- */
279
- static createMaxAgeTranspiredError(): ClientAuthError;
280
- /**
281
- * Creates an error thrown when the mnonce is not present
282
- * @param missingNonce
283
- */
284
- static createNonceNotFoundError(missingNonce: string): ClientAuthError;
285
- /**
286
- * Throws error when multiple tokens are in cache.
287
- */
288
- static createMultipleMatchingTokensInCacheError(): ClientAuthError;
289
- /**
290
- * Throws error when multiple accounts are in cache for the given params
291
- */
292
- static createMultipleMatchingAccountsInCacheError(): ClientAuthError;
293
- /**
294
- * Throws error when multiple appMetada are in cache for the given clientId.
295
- */
296
- static createMultipleMatchingAppMetadataInCacheError(): ClientAuthError;
297
- /**
298
- * Throws error when no auth code or refresh token is given to ServerTokenRequestParameters.
299
- */
300
- static createTokenRequestCannotBeMadeError(): ClientAuthError;
301
- /**
302
- * Throws error when attempting to append a null, undefined or empty scope to a set
303
- * @param givenScope
304
- */
305
- static createAppendEmptyScopeToSetError(givenScope: string): ClientAuthError;
306
- /**
307
- * Throws error when attempting to append a null, undefined or empty scope to a set
308
- * @param givenScope
309
- */
310
- static createRemoveEmptyScopeFromSetError(givenScope: string): ClientAuthError;
311
- /**
312
- * Throws error when attempting to append null or empty ScopeSet.
313
- * @param appendError
314
- */
315
- static createAppendScopeSetError(appendError: string): ClientAuthError;
316
- /**
317
- * Throws error if ScopeSet is null or undefined.
318
- * @param givenScopeSet
319
- */
320
- static createEmptyInputScopeSetError(): ClientAuthError;
321
- /**
322
- * Throws error if user sets CancellationToken.cancel = true during polling of token endpoint during device code flow
323
- */
324
- static createDeviceCodeCancelledError(): ClientAuthError;
325
- /**
326
- * Throws error if device code is expired
327
- */
328
- static createDeviceCodeExpiredError(): ClientAuthError;
329
- /**
330
- * Throws error if device code is expired
331
- */
332
- static createDeviceCodeUnknownError(): ClientAuthError;
333
- /**
334
- * Throws error when silent requests are made without an account object
335
- */
336
- static createNoAccountInSilentRequestError(): ClientAuthError;
337
- /**
338
- * Throws error when cache record is null or undefined.
339
- */
340
- static createNullOrUndefinedCacheRecord(): ClientAuthError;
341
- /**
342
- * Throws error when provided environment is not part of the CloudDiscoveryMetadata object
343
- */
344
- static createInvalidCacheEnvironmentError(): ClientAuthError;
345
- /**
346
- * Throws error when account is not found in cache.
347
- */
348
- static createNoAccountFoundError(): ClientAuthError;
349
- /**
350
- * Throws error if ICachePlugin not set on CacheManager.
351
- */
352
- static createCachePluginError(): ClientAuthError;
353
- /**
354
- * Throws error if crypto object not found.
355
- * @param operationName
356
- */
357
- static createNoCryptoObjectError(operationName: string): ClientAuthError;
358
- /**
359
- * Throws error if cache type is invalid.
360
- */
361
- static createInvalidCacheTypeError(): ClientAuthError;
362
- /**
363
- * Throws error if unexpected account type.
364
- */
365
- static createUnexpectedAccountTypeError(): ClientAuthError;
366
- /**
367
- * Throws error if unexpected credential type.
368
- */
369
- static createUnexpectedCredentialTypeError(): ClientAuthError;
370
- /**
371
- * Throws error if client assertion is not valid.
372
- */
373
- static createInvalidAssertionError(): ClientAuthError;
374
- /**
375
- * Throws error if client assertion is not valid.
376
- */
377
- static createInvalidCredentialError(): ClientAuthError;
378
- /**
379
- * Throws error if token cannot be retrieved from cache due to refresh being required.
380
- */
381
- static createRefreshRequiredError(): ClientAuthError;
382
- /**
383
- * Throws error if the user defined timeout is reached.
384
- */
385
- static createUserTimeoutReachedError(): ClientAuthError;
386
- static createTokenClaimsRequiredError(): ClientAuthError;
387
- /**
388
- * Throws error when the authorization code is missing from the server response
389
- */
390
- static createNoAuthCodeInServerResponseError(): ClientAuthError;
391
- static createBindingKeyNotRemovedError(): ClientAuthError;
392
- /**
393
- * Thrown when logout is attempted for an authority that doesnt have an end_session_endpoint
394
- */
395
- static createLogoutNotSupportedError(): ClientAuthError;
396
- /**
397
- * Create an error when kid attribute is missing from a PoP token's cache record
398
- */
399
- static createKeyIdMissingError(): ClientAuthError;
400
- /**
401
- * Create an error when the client does not have network connectivity
402
- */
403
- static createNoNetworkConnectivityError(): ClientAuthError;
404
- /**
405
- * Create an error when the user cancels the flow
406
- */
407
- static createUserCanceledError(): ClientAuthError;
408
- /**
409
- * Creates an error for during acquireTokenByClientCredential when TenantId is set to "common" or "organizations"
410
- */
411
- static createMissingTenantIdError(): ClientAuthError;
230
+ constructor(errorCode: string, additionalMessage?: string);
412
231
  }
232
+ export declare function createClientAuthError(errorCode: string, additionalMessage?: string): ClientAuthError;
413
233
  //# sourceMappingURL=ClientAuthError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClientAuthError.d.ts","sourceRoot":"","sources":["../../src/error/ClientAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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