@azure/msal-common 14.0.0-alpha.1 → 14.0.0-beta.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 (187) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +62 -62
  3. package/dist/account/AccountInfo.d.ts +31 -31
  4. package/dist/account/AuthToken.d.ts +20 -20
  5. package/dist/account/AuthToken.js +48 -48
  6. package/dist/account/CcsCredential.d.ts +9 -8
  7. package/dist/account/CcsCredential.d.ts.map +1 -1
  8. package/dist/account/CcsCredential.js +9 -10
  9. package/dist/account/CcsCredential.js.map +1 -1
  10. package/dist/account/ClientCredentials.d.ts +14 -14
  11. package/dist/account/ClientInfo.d.ts +19 -19
  12. package/dist/account/ClientInfo.js +37 -37
  13. package/dist/account/DecodedAuthToken.d.ts +8 -8
  14. package/dist/account/TokenClaims.d.ts +65 -65
  15. package/dist/authority/Authority.d.ts +228 -215
  16. package/dist/authority/Authority.d.ts.map +1 -1
  17. package/dist/authority/Authority.js +716 -682
  18. package/dist/authority/Authority.js.map +1 -1
  19. package/dist/authority/AuthorityFactory.d.ts +30 -30
  20. package/dist/authority/AuthorityFactory.js +47 -47
  21. package/dist/authority/AuthorityMetadata.d.ts +622 -622
  22. package/dist/authority/AuthorityMetadata.js +876 -876
  23. package/dist/authority/AuthorityOptions.d.ts +19 -18
  24. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  25. package/dist/authority/AuthorityOptions.js +19 -20
  26. package/dist/authority/AuthorityOptions.js.map +1 -1
  27. package/dist/authority/AuthorityType.d.ts +10 -9
  28. package/dist/authority/AuthorityType.d.ts.map +1 -1
  29. package/dist/authority/AuthorityType.js +14 -15
  30. package/dist/authority/AuthorityType.js.map +1 -1
  31. package/dist/authority/AzureRegion.d.ts +1 -1
  32. package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
  33. package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
  34. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
  35. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +8 -8
  36. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
  37. package/dist/authority/CloudInstanceDiscoveryResponse.js +8 -8
  38. package/dist/authority/ImdsOptions.d.ts +5 -5
  39. package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
  40. package/dist/authority/OpenIdConfigResponse.js +10 -10
  41. package/dist/authority/ProtocolMode.d.ts +8 -7
  42. package/dist/authority/ProtocolMode.d.ts.map +1 -1
  43. package/dist/authority/ProtocolMode.js +12 -13
  44. package/dist/authority/ProtocolMode.js.map +1 -1
  45. package/dist/authority/RegionDiscovery.d.ts +30 -30
  46. package/dist/authority/RegionDiscovery.js +108 -108
  47. package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
  48. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
  49. package/dist/cache/CacheManager.d.ts +443 -443
  50. package/dist/cache/CacheManager.js +1011 -1011
  51. package/dist/cache/entities/AccessTokenEntity.d.ts +56 -56
  52. package/dist/cache/entities/AccessTokenEntity.js +111 -111
  53. package/dist/cache/entities/AccountEntity.d.ts +99 -99
  54. package/dist/cache/entities/AccountEntity.js +248 -248
  55. package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
  56. package/dist/cache/entities/AppMetadataEntity.js +66 -66
  57. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +47 -47
  58. package/dist/cache/entities/AuthorityMetadataEntity.js +77 -77
  59. package/dist/cache/entities/CacheRecord.d.ts +13 -13
  60. package/dist/cache/entities/CacheRecord.js +13 -13
  61. package/dist/cache/entities/CredentialEntity.d.ts +88 -88
  62. package/dist/cache/entities/CredentialEntity.js +136 -136
  63. package/dist/cache/entities/IdTokenEntity.d.ts +34 -34
  64. package/dist/cache/entities/IdTokenEntity.js +56 -56
  65. package/dist/cache/entities/RefreshTokenEntity.d.ts +36 -36
  66. package/dist/cache/entities/RefreshTokenEntity.js +59 -59
  67. package/dist/cache/entities/ServerTelemetryEntity.d.ts +12 -12
  68. package/dist/cache/entities/ServerTelemetryEntity.js +27 -27
  69. package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
  70. package/dist/cache/entities/ThrottlingEntity.js +23 -23
  71. package/dist/cache/interface/ICacheManager.d.ts +165 -165
  72. package/dist/cache/interface/ICachePlugin.d.ts +5 -5
  73. package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
  74. package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
  75. package/dist/cache/persistence/TokenCacheContext.js +25 -25
  76. package/dist/cache/utils/CacheTypes.d.ts +62 -62
  77. package/dist/client/AuthorizationCodeClient.d.ts +71 -71
  78. package/dist/client/AuthorizationCodeClient.js +433 -433
  79. package/dist/client/BaseClient.d.ts +50 -50
  80. package/dist/client/BaseClient.js +92 -92
  81. package/dist/client/RefreshTokenClient.d.ts +34 -34
  82. package/dist/client/RefreshTokenClient.js +239 -239
  83. package/dist/client/SilentFlowClient.d.ts +24 -24
  84. package/dist/client/SilentFlowClient.js +94 -94
  85. package/dist/config/AppTokenProvider.d.ts +38 -38
  86. package/dist/config/ClientConfiguration.d.ts +133 -133
  87. package/dist/config/ClientConfiguration.js +88 -88
  88. package/dist/crypto/ICrypto.d.ts +62 -62
  89. package/dist/crypto/ICrypto.js +42 -42
  90. package/dist/crypto/IGuidGenerator.d.ts +4 -4
  91. package/dist/crypto/JoseHeader.d.ts +21 -21
  92. package/dist/crypto/JoseHeader.js +36 -36
  93. package/dist/crypto/PopTokenGenerator.d.ts +58 -57
  94. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  95. package/dist/crypto/PopTokenGenerator.js +82 -83
  96. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  97. package/dist/crypto/SignedHttpRequest.d.ts +11 -11
  98. package/dist/error/AuthError.d.ts +47 -47
  99. package/dist/error/AuthError.js +51 -51
  100. package/dist/error/ClientAuthError.d.ts +412 -412
  101. package/dist/error/ClientAuthError.js +519 -519
  102. package/dist/error/ClientConfigurationError.d.ts +206 -198
  103. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  104. package/dist/error/ClientConfigurationError.js +259 -249
  105. package/dist/error/ClientConfigurationError.js.map +1 -1
  106. package/dist/error/InteractionRequiredAuthError.d.ts +59 -59
  107. package/dist/error/InteractionRequiredAuthError.js +78 -78
  108. package/dist/error/JoseHeaderError.d.ts +28 -28
  109. package/dist/error/JoseHeaderError.js +39 -39
  110. package/dist/error/ServerError.d.ts +7 -7
  111. package/dist/error/ServerError.js +14 -14
  112. package/dist/index.cjs.js +8826 -8813
  113. package/dist/index.cjs.js.map +1 -1
  114. package/dist/index.d.ts +93 -93
  115. package/dist/index.js +1 -1
  116. package/dist/logger/Logger.d.ts +95 -95
  117. package/dist/logger/Logger.js +197 -197
  118. package/dist/network/INetworkModule.d.ts +29 -29
  119. package/dist/network/INetworkModule.js +14 -14
  120. package/dist/network/NetworkManager.d.ts +32 -32
  121. package/dist/network/NetworkManager.js +33 -33
  122. package/dist/network/RequestThumbprint.d.ts +16 -16
  123. package/dist/network/ThrottlingUtils.d.ts +41 -41
  124. package/dist/network/ThrottlingUtils.js +94 -94
  125. package/dist/packageMetadata.d.ts +2 -2
  126. package/dist/packageMetadata.d.ts.map +1 -1
  127. package/dist/packageMetadata.js +4 -4
  128. package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
  129. package/dist/request/AuthenticationHeaderParser.js +55 -55
  130. package/dist/request/BaseAuthRequest.d.ts +37 -37
  131. package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
  132. package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
  133. package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
  134. package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
  135. package/dist/request/CommonEndSessionRequest.d.ts +21 -21
  136. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
  137. package/dist/request/CommonRefreshTokenRequest.d.ts +19 -19
  138. package/dist/request/CommonSilentFlowRequest.d.ts +18 -18
  139. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
  140. package/dist/request/NativeRequest.d.ts +19 -19
  141. package/dist/request/NativeSignOutRequest.d.ts +5 -5
  142. package/dist/request/RequestParameterBuilder.d.ts +216 -216
  143. package/dist/request/RequestParameterBuilder.js +374 -374
  144. package/dist/request/RequestValidator.d.ts +33 -33
  145. package/dist/request/RequestValidator.js +82 -83
  146. package/dist/request/RequestValidator.js.map +1 -1
  147. package/dist/request/ScopeSet.d.ts +88 -88
  148. package/dist/request/ScopeSet.js +197 -197
  149. package/dist/response/AuthenticationResult.d.ts +39 -39
  150. package/dist/response/AuthorizationCodePayload.d.ts +13 -13
  151. package/dist/response/DeviceCodeResponse.d.ts +25 -25
  152. package/dist/response/ExternalTokenResponse.d.ts +15 -15
  153. package/dist/response/IMDSBadResponse.d.ts +4 -4
  154. package/dist/response/ResponseHandler.d.ts +72 -72
  155. package/dist/response/ResponseHandler.js +300 -300
  156. package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
  157. package/dist/response/ServerAuthorizationTokenResponse.d.ts +44 -44
  158. package/dist/telemetry/performance/IPerformanceClient.d.ts +42 -42
  159. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
  160. package/dist/telemetry/performance/PerformanceClient.d.ts +189 -189
  161. package/dist/telemetry/performance/PerformanceClient.js +406 -406
  162. package/dist/telemetry/performance/PerformanceEvent.d.ts +441 -439
  163. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  164. package/dist/telemetry/performance/PerformanceEvent.js +225 -227
  165. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -1
  166. package/dist/telemetry/performance/StubPerformanceClient.d.ts +15 -19
  167. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  168. package/dist/telemetry/performance/StubPerformanceClient.js +22 -36
  169. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -1
  170. package/dist/telemetry/server/ServerTelemetryManager.d.ts +65 -65
  171. package/dist/telemetry/server/ServerTelemetryManager.js +196 -196
  172. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
  173. package/dist/url/IUri.d.ts +12 -12
  174. package/dist/url/UrlString.d.ts +70 -70
  175. package/dist/url/UrlString.js +242 -242
  176. package/dist/utils/Constants.d.ts +345 -331
  177. package/dist/utils/Constants.d.ts.map +1 -1
  178. package/dist/utils/Constants.js +353 -373
  179. package/dist/utils/Constants.js.map +1 -1
  180. package/dist/utils/MsalTypes.d.ts +6 -6
  181. package/dist/utils/ProtocolUtils.d.ts +42 -42
  182. package/dist/utils/ProtocolUtils.js +71 -71
  183. package/dist/utils/StringUtils.d.ts +53 -53
  184. package/dist/utils/StringUtils.js +124 -124
  185. package/dist/utils/TimeUtils.d.ts +27 -27
  186. package/dist/utils/TimeUtils.js +45 -45
  187. package/package.json +86 -79
@@ -1,413 +1,413 @@
1
- import { AuthError } from "./AuthError";
2
- /**
3
- * ClientAuthErrorMessage class containing string constants used by error codes and messages.
4
- */
5
- export declare const ClientAuthErrorMessage: {
6
- clientInfoDecodingError: {
7
- code: string;
8
- desc: string;
9
- };
10
- clientInfoEmptyError: {
11
- code: string;
12
- desc: string;
13
- };
14
- tokenParsingError: {
15
- code: string;
16
- desc: string;
17
- };
18
- nullOrEmptyToken: {
19
- code: string;
20
- desc: string;
21
- };
22
- endpointResolutionError: {
23
- code: string;
24
- desc: string;
25
- };
26
- networkError: {
27
- code: string;
28
- desc: string;
29
- };
30
- unableToGetOpenidConfigError: {
31
- code: string;
32
- desc: string;
33
- };
34
- hashNotDeserialized: {
35
- code: string;
36
- desc: string;
37
- };
38
- blankGuidGenerated: {
39
- code: string;
40
- desc: string;
41
- };
42
- invalidStateError: {
43
- code: string;
44
- desc: string;
45
- };
46
- stateMismatchError: {
47
- code: string;
48
- desc: string;
49
- };
50
- stateNotFoundError: {
51
- code: string;
52
- desc: string;
53
- };
54
- nonceMismatchError: {
55
- code: string;
56
- desc: string;
57
- };
58
- nonceNotFoundError: {
59
- code: string;
60
- desc: string;
61
- };
62
- authTimeNotFoundError: {
63
- code: string;
64
- desc: string;
65
- };
66
- maxAgeTranspiredError: {
67
- code: string;
68
- desc: string;
69
- };
70
- noTokensFoundError: {
71
- code: string;
72
- desc: string;
73
- };
74
- multipleMatchingTokens: {
75
- code: string;
76
- desc: string;
77
- };
78
- multipleMatchingAccounts: {
79
- code: string;
80
- desc: string;
81
- };
82
- multipleMatchingAppMetadata: {
83
- code: string;
84
- desc: string;
85
- };
86
- tokenRequestCannotBeMade: {
87
- code: string;
88
- desc: string;
89
- };
90
- appendEmptyScopeError: {
91
- code: string;
92
- desc: string;
93
- };
94
- removeEmptyScopeError: {
95
- code: string;
96
- desc: string;
97
- };
98
- appendScopeSetError: {
99
- code: string;
100
- desc: string;
101
- };
102
- emptyInputScopeSetError: {
103
- code: string;
104
- desc: string;
105
- };
106
- DeviceCodePollingCancelled: {
107
- code: string;
108
- desc: string;
109
- };
110
- DeviceCodeExpired: {
111
- code: string;
112
- desc: string;
113
- };
114
- DeviceCodeUnknownError: {
115
- code: string;
116
- desc: string;
117
- };
118
- NoAccountInSilentRequest: {
119
- code: string;
120
- desc: string;
121
- };
122
- invalidCacheRecord: {
123
- code: string;
124
- desc: string;
125
- };
126
- invalidCacheEnvironment: {
127
- code: string;
128
- desc: string;
129
- };
130
- noAccountFound: {
131
- code: string;
132
- desc: string;
133
- };
134
- CachePluginError: {
135
- code: string;
136
- desc: string;
137
- };
138
- noCryptoObj: {
139
- code: string;
140
- desc: string;
141
- };
142
- invalidCacheType: {
143
- code: string;
144
- desc: string;
145
- };
146
- unexpectedAccountType: {
147
- code: string;
148
- desc: string;
149
- };
150
- unexpectedCredentialType: {
151
- code: string;
152
- desc: string;
153
- };
154
- invalidAssertion: {
155
- code: string;
156
- desc: string;
157
- };
158
- invalidClientCredential: {
159
- code: string;
160
- desc: string;
161
- };
162
- tokenRefreshRequired: {
163
- code: string;
164
- desc: string;
165
- };
166
- userTimeoutReached: {
167
- code: string;
168
- desc: string;
169
- };
170
- tokenClaimsRequired: {
171
- code: string;
172
- desc: string;
173
- };
174
- noAuthorizationCodeFromServer: {
175
- code: string;
176
- desc: string;
177
- };
178
- noAzureRegionDetected: {
179
- code: string;
180
- desc: string;
181
- };
182
- accessTokenEntityNullError: {
183
- code: string;
184
- desc: string;
185
- };
186
- bindingKeyNotRemovedError: {
187
- code: string;
188
- desc: string;
189
- };
190
- logoutNotSupported: {
191
- code: string;
192
- desc: string;
193
- };
194
- keyIdMissing: {
195
- code: string;
196
- desc: string;
197
- };
198
- noNetworkConnectivity: {
199
- code: string;
200
- desc: string;
201
- };
202
- userCanceledError: {
203
- code: string;
204
- desc: string;
205
- };
206
- missingTenantIdError: {
207
- code: string;
208
- desc: string;
209
- };
210
- };
211
- /**
212
- * Error thrown when there is an error in the client code running on the browser.
213
- */
214
- 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;
412
- }
1
+ import { AuthError } from "./AuthError";
2
+ /**
3
+ * ClientAuthErrorMessage class containing string constants used by error codes and messages.
4
+ */
5
+ export declare const ClientAuthErrorMessage: {
6
+ clientInfoDecodingError: {
7
+ code: string;
8
+ desc: string;
9
+ };
10
+ clientInfoEmptyError: {
11
+ code: string;
12
+ desc: string;
13
+ };
14
+ tokenParsingError: {
15
+ code: string;
16
+ desc: string;
17
+ };
18
+ nullOrEmptyToken: {
19
+ code: string;
20
+ desc: string;
21
+ };
22
+ endpointResolutionError: {
23
+ code: string;
24
+ desc: string;
25
+ };
26
+ networkError: {
27
+ code: string;
28
+ desc: string;
29
+ };
30
+ unableToGetOpenidConfigError: {
31
+ code: string;
32
+ desc: string;
33
+ };
34
+ hashNotDeserialized: {
35
+ code: string;
36
+ desc: string;
37
+ };
38
+ blankGuidGenerated: {
39
+ code: string;
40
+ desc: string;
41
+ };
42
+ invalidStateError: {
43
+ code: string;
44
+ desc: string;
45
+ };
46
+ stateMismatchError: {
47
+ code: string;
48
+ desc: string;
49
+ };
50
+ stateNotFoundError: {
51
+ code: string;
52
+ desc: string;
53
+ };
54
+ nonceMismatchError: {
55
+ code: string;
56
+ desc: string;
57
+ };
58
+ nonceNotFoundError: {
59
+ code: string;
60
+ desc: string;
61
+ };
62
+ authTimeNotFoundError: {
63
+ code: string;
64
+ desc: string;
65
+ };
66
+ maxAgeTranspiredError: {
67
+ code: string;
68
+ desc: string;
69
+ };
70
+ noTokensFoundError: {
71
+ code: string;
72
+ desc: string;
73
+ };
74
+ multipleMatchingTokens: {
75
+ code: string;
76
+ desc: string;
77
+ };
78
+ multipleMatchingAccounts: {
79
+ code: string;
80
+ desc: string;
81
+ };
82
+ multipleMatchingAppMetadata: {
83
+ code: string;
84
+ desc: string;
85
+ };
86
+ tokenRequestCannotBeMade: {
87
+ code: string;
88
+ desc: string;
89
+ };
90
+ appendEmptyScopeError: {
91
+ code: string;
92
+ desc: string;
93
+ };
94
+ removeEmptyScopeError: {
95
+ code: string;
96
+ desc: string;
97
+ };
98
+ appendScopeSetError: {
99
+ code: string;
100
+ desc: string;
101
+ };
102
+ emptyInputScopeSetError: {
103
+ code: string;
104
+ desc: string;
105
+ };
106
+ DeviceCodePollingCancelled: {
107
+ code: string;
108
+ desc: string;
109
+ };
110
+ DeviceCodeExpired: {
111
+ code: string;
112
+ desc: string;
113
+ };
114
+ DeviceCodeUnknownError: {
115
+ code: string;
116
+ desc: string;
117
+ };
118
+ NoAccountInSilentRequest: {
119
+ code: string;
120
+ desc: string;
121
+ };
122
+ invalidCacheRecord: {
123
+ code: string;
124
+ desc: string;
125
+ };
126
+ invalidCacheEnvironment: {
127
+ code: string;
128
+ desc: string;
129
+ };
130
+ noAccountFound: {
131
+ code: string;
132
+ desc: string;
133
+ };
134
+ CachePluginError: {
135
+ code: string;
136
+ desc: string;
137
+ };
138
+ noCryptoObj: {
139
+ code: string;
140
+ desc: string;
141
+ };
142
+ invalidCacheType: {
143
+ code: string;
144
+ desc: string;
145
+ };
146
+ unexpectedAccountType: {
147
+ code: string;
148
+ desc: string;
149
+ };
150
+ unexpectedCredentialType: {
151
+ code: string;
152
+ desc: string;
153
+ };
154
+ invalidAssertion: {
155
+ code: string;
156
+ desc: string;
157
+ };
158
+ invalidClientCredential: {
159
+ code: string;
160
+ desc: string;
161
+ };
162
+ tokenRefreshRequired: {
163
+ code: string;
164
+ desc: string;
165
+ };
166
+ userTimeoutReached: {
167
+ code: string;
168
+ desc: string;
169
+ };
170
+ tokenClaimsRequired: {
171
+ code: string;
172
+ desc: string;
173
+ };
174
+ noAuthorizationCodeFromServer: {
175
+ code: string;
176
+ desc: string;
177
+ };
178
+ noAzureRegionDetected: {
179
+ code: string;
180
+ desc: string;
181
+ };
182
+ accessTokenEntityNullError: {
183
+ code: string;
184
+ desc: string;
185
+ };
186
+ bindingKeyNotRemovedError: {
187
+ code: string;
188
+ desc: string;
189
+ };
190
+ logoutNotSupported: {
191
+ code: string;
192
+ desc: string;
193
+ };
194
+ keyIdMissing: {
195
+ code: string;
196
+ desc: string;
197
+ };
198
+ noNetworkConnectivity: {
199
+ code: string;
200
+ desc: string;
201
+ };
202
+ userCanceledError: {
203
+ code: string;
204
+ desc: string;
205
+ };
206
+ missingTenantIdError: {
207
+ code: string;
208
+ desc: string;
209
+ };
210
+ };
211
+ /**
212
+ * Error thrown when there is an error in the client code running on the browser.
213
+ */
214
+ 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;
412
+ }
413
413
  //# sourceMappingURL=ClientAuthError.d.ts.map