@azure/msal-common 4.2.1 → 4.5.1

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 (190) hide show
  1. package/CHANGELOG.json +212 -1
  2. package/LICENSE +21 -21
  3. package/README.md +61 -58
  4. package/changelog.md +402 -344
  5. package/dist/_virtual/_tslib.js +90 -0
  6. package/dist/_virtual/_tslib.js.map +1 -0
  7. package/dist/account/AuthToken.js +43 -0
  8. package/dist/account/AuthToken.js.map +1 -0
  9. package/dist/account/CcsCredential.d.ts +9 -0
  10. package/dist/account/CcsCredential.d.ts.map +1 -0
  11. package/dist/account/CcsCredential.js +14 -0
  12. package/dist/account/CcsCredential.js.map +1 -0
  13. package/dist/account/ClientInfo.d.ts +6 -1
  14. package/dist/account/ClientInfo.d.ts.map +1 -1
  15. package/dist/account/ClientInfo.js +44 -0
  16. package/dist/account/ClientInfo.js.map +1 -0
  17. package/dist/account/TokenClaims.d.ts +1 -0
  18. package/dist/account/TokenClaims.d.ts.map +1 -1
  19. package/dist/authority/Authority.d.ts +25 -0
  20. package/dist/authority/Authority.d.ts.map +1 -1
  21. package/dist/authority/Authority.js +574 -0
  22. package/dist/authority/Authority.js.map +1 -0
  23. package/dist/authority/AuthorityFactory.js +69 -0
  24. package/dist/authority/AuthorityFactory.js.map +1 -0
  25. package/dist/authority/AuthorityOptions.d.ts +2 -0
  26. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  27. package/dist/authority/AuthorityType.js +17 -0
  28. package/dist/authority/AuthorityType.js.map +1 -0
  29. package/dist/authority/AzureRegion.d.ts +2 -0
  30. package/dist/authority/AzureRegion.d.ts.map +1 -0
  31. package/dist/authority/AzureRegionConfiguration.d.ts +6 -0
  32. package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -0
  33. package/dist/authority/CloudInstanceDiscoveryResponse.js +13 -0
  34. package/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -0
  35. package/dist/authority/OpenIdConfigResponse.js +15 -0
  36. package/dist/authority/OpenIdConfigResponse.js.map +1 -0
  37. package/dist/authority/ProtocolMode.js +17 -0
  38. package/dist/authority/ProtocolMode.js.map +1 -0
  39. package/dist/authority/RegionDiscovery.d.ts +31 -0
  40. package/dist/authority/RegionDiscovery.d.ts.map +1 -0
  41. package/dist/authority/RegionDiscovery.js +119 -0
  42. package/dist/authority/RegionDiscovery.js.map +1 -0
  43. package/dist/authority/RegionDiscoveryMetadata.d.ts +7 -0
  44. package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
  45. package/dist/cache/CacheManager.js +713 -0
  46. package/dist/cache/CacheManager.js.map +1 -0
  47. package/dist/cache/entities/AccessTokenEntity.js +111 -0
  48. package/dist/cache/entities/AccessTokenEntity.js.map +1 -0
  49. package/dist/cache/entities/AccountEntity.d.ts +5 -5
  50. package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
  51. package/dist/cache/entities/AccountEntity.js +242 -0
  52. package/dist/cache/entities/AccountEntity.js.map +1 -0
  53. package/dist/cache/entities/AppMetadataEntity.js +74 -0
  54. package/dist/cache/entities/AppMetadataEntity.js.map +1 -0
  55. package/dist/cache/entities/AuthorityMetadataEntity.js +81 -0
  56. package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -0
  57. package/dist/cache/entities/CacheRecord.js +19 -0
  58. package/dist/cache/entities/CacheRecord.js.map +1 -0
  59. package/dist/cache/entities/CredentialEntity.js +142 -0
  60. package/dist/cache/entities/CredentialEntity.js.map +1 -0
  61. package/dist/cache/entities/IdTokenEntity.js +71 -0
  62. package/dist/cache/entities/IdTokenEntity.js.map +1 -0
  63. package/dist/cache/entities/RefreshTokenEntity.js +73 -0
  64. package/dist/cache/entities/RefreshTokenEntity.js.map +1 -0
  65. package/dist/cache/entities/ServerTelemetryEntity.js +35 -0
  66. package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -0
  67. package/dist/cache/entities/ThrottlingEntity.js +32 -0
  68. package/dist/cache/entities/ThrottlingEntity.js.map +1 -0
  69. package/dist/cache/persistence/TokenCacheContext.js +39 -0
  70. package/dist/cache/persistence/TokenCacheContext.js.map +1 -0
  71. package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
  72. package/dist/client/AuthorizationCodeClient.js +388 -0
  73. package/dist/client/AuthorizationCodeClient.js.map +1 -0
  74. package/dist/client/BaseClient.d.ts +2 -1
  75. package/dist/client/BaseClient.d.ts.map +1 -1
  76. package/dist/client/BaseClient.js +101 -0
  77. package/dist/client/BaseClient.js.map +1 -0
  78. package/dist/client/ClientCredentialClient.d.ts.map +1 -1
  79. package/dist/client/ClientCredentialClient.js +169 -0
  80. package/dist/client/ClientCredentialClient.js.map +1 -0
  81. package/dist/client/DeviceCodeClient.d.ts +6 -0
  82. package/dist/client/DeviceCodeClient.d.ts.map +1 -1
  83. package/dist/client/DeviceCodeClient.js +212 -0
  84. package/dist/client/DeviceCodeClient.js.map +1 -0
  85. package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
  86. package/dist/client/OnBehalfOfClient.js +209 -0
  87. package/dist/client/OnBehalfOfClient.js.map +1 -0
  88. package/dist/client/RefreshTokenClient.d.ts.map +1 -1
  89. package/dist/client/RefreshTokenClient.js +212 -0
  90. package/dist/client/RefreshTokenClient.js.map +1 -0
  91. package/dist/client/SilentFlowClient.d.ts.map +1 -1
  92. package/dist/client/SilentFlowClient.js +132 -0
  93. package/dist/client/SilentFlowClient.js.map +1 -0
  94. package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
  95. package/dist/client/UsernamePasswordClient.js +112 -0
  96. package/dist/client/UsernamePasswordClient.js.map +1 -0
  97. package/dist/config/ClientConfiguration.d.ts +3 -0
  98. package/dist/config/ClientConfiguration.d.ts.map +1 -1
  99. package/dist/config/ClientConfiguration.js +91 -0
  100. package/dist/config/ClientConfiguration.js.map +1 -0
  101. package/dist/crypto/ICrypto.js +53 -0
  102. package/dist/crypto/ICrypto.js.map +1 -0
  103. package/dist/crypto/PopTokenGenerator.js +72 -0
  104. package/dist/crypto/PopTokenGenerator.js.map +1 -0
  105. package/dist/error/AuthError.js +46 -0
  106. package/dist/error/AuthError.js.map +1 -0
  107. package/dist/error/ClientAuthError.d.ts +13 -6
  108. package/dist/error/ClientAuthError.d.ts.map +1 -1
  109. package/dist/error/ClientAuthError.js +456 -0
  110. package/dist/error/ClientAuthError.js.map +1 -0
  111. package/dist/error/ClientConfigurationError.d.ts +1 -6
  112. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  113. package/dist/error/ClientConfigurationError.js +210 -0
  114. package/dist/error/ClientConfigurationError.js.map +1 -0
  115. package/dist/error/InteractionRequiredAuthError.js +48 -0
  116. package/dist/error/InteractionRequiredAuthError.js.map +1 -0
  117. package/dist/error/ServerError.js +25 -0
  118. package/dist/error/ServerError.js.map +1 -0
  119. package/dist/index.cjs.js +7045 -0
  120. package/dist/index.cjs.js.map +1 -0
  121. package/dist/index.d.ts +4 -0
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +43 -6479
  124. package/dist/index.js.map +1 -0
  125. package/dist/logger/Logger.d.ts +12 -3
  126. package/dist/logger/Logger.d.ts.map +1 -1
  127. package/dist/logger/Logger.js +183 -0
  128. package/dist/logger/Logger.js.map +1 -0
  129. package/dist/network/INetworkModule.d.ts +1 -1
  130. package/dist/network/INetworkModule.d.ts.map +1 -1
  131. package/dist/network/INetworkModule.js +21 -0
  132. package/dist/network/INetworkModule.js.map +1 -0
  133. package/dist/network/NetworkManager.js +56 -0
  134. package/dist/network/NetworkManager.js.map +1 -0
  135. package/dist/network/ThrottlingUtils.d.ts.map +1 -1
  136. package/dist/network/ThrottlingUtils.js +95 -0
  137. package/dist/network/ThrottlingUtils.js.map +1 -0
  138. package/dist/packageMetadata.d.ts +1 -1
  139. package/dist/packageMetadata.js +8 -0
  140. package/dist/packageMetadata.js.map +1 -0
  141. package/dist/request/CommonAuthorizationCodeRequest.d.ts +3 -0
  142. package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
  143. package/dist/request/CommonAuthorizationUrlRequest.d.ts +1 -0
  144. package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
  145. package/dist/request/CommonClientCredentialRequest.d.ts +7 -4
  146. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
  147. package/dist/request/CommonRefreshTokenRequest.d.ts +2 -0
  148. package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
  149. package/dist/request/RequestParameterBuilder.d.ts +11 -0
  150. package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
  151. package/dist/request/RequestParameterBuilder.js +340 -0
  152. package/dist/request/RequestParameterBuilder.js.map +1 -0
  153. package/dist/request/RequestValidator.d.ts.map +1 -1
  154. package/dist/request/RequestValidator.js +92 -0
  155. package/dist/request/RequestValidator.js.map +1 -0
  156. package/dist/request/ScopeSet.js +192 -0
  157. package/dist/request/ScopeSet.js.map +1 -0
  158. package/dist/response/AuthenticationResult.d.ts +1 -1
  159. package/dist/response/AuthenticationResult.d.ts.map +1 -1
  160. package/dist/response/AuthorizationCodePayload.d.ts +1 -0
  161. package/dist/response/AuthorizationCodePayload.d.ts.map +1 -1
  162. package/dist/response/IMDSBadResponse.d.ts +5 -0
  163. package/dist/response/IMDSBadResponse.d.ts.map +1 -0
  164. package/dist/response/ResponseHandler.d.ts.map +1 -1
  165. package/dist/response/ResponseHandler.js +281 -0
  166. package/dist/response/ResponseHandler.js.map +1 -0
  167. package/dist/telemetry/server/ServerTelemetryManager.d.ts +23 -1
  168. package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
  169. package/dist/telemetry/server/ServerTelemetryManager.js +168 -0
  170. package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -0
  171. package/dist/url/UrlString.d.ts +10 -0
  172. package/dist/url/UrlString.d.ts.map +1 -1
  173. package/dist/url/UrlString.js +223 -0
  174. package/dist/url/UrlString.js.map +1 -0
  175. package/dist/utils/Constants.d.ts +47 -4
  176. package/dist/utils/Constants.d.ts.map +1 -1
  177. package/dist/utils/Constants.js +362 -0
  178. package/dist/utils/Constants.js.map +1 -0
  179. package/dist/utils/ProtocolUtils.js +77 -0
  180. package/dist/utils/ProtocolUtils.js.map +1 -0
  181. package/dist/utils/StringUtils.d.ts +5 -0
  182. package/dist/utils/StringUtils.d.ts.map +1 -1
  183. package/dist/utils/StringUtils.js +128 -0
  184. package/dist/utils/StringUtils.js.map +1 -0
  185. package/dist/utils/TimeUtils.d.ts +13 -0
  186. package/dist/utils/TimeUtils.d.ts.map +1 -1
  187. package/dist/utils/TimeUtils.js +53 -0
  188. package/dist/utils/TimeUtils.js.map +1 -0
  189. package/package.json +10 -19
  190. package/dist/index.es.js +0 -6472
@@ -0,0 +1,456 @@
1
+ /*! @azure/msal-common v4.5.1 2021-08-02 */
2
+ 'use strict';
3
+ import { __extends } from '../_virtual/_tslib.js';
4
+ import { AuthError } from './AuthError.js';
5
+
6
+ /*
7
+ * Copyright (c) Microsoft Corporation. All rights reserved.
8
+ * Licensed under the MIT License.
9
+ */
10
+ /**
11
+ * ClientAuthErrorMessage class containing string constants used by error codes and messages.
12
+ */
13
+ var ClientAuthErrorMessage = {
14
+ clientInfoDecodingError: {
15
+ code: "client_info_decoding_error",
16
+ desc: "The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."
17
+ },
18
+ clientInfoEmptyError: {
19
+ code: "client_info_empty_error",
20
+ desc: "The client info was empty. Please review the trace to determine the root cause."
21
+ },
22
+ tokenParsingError: {
23
+ code: "token_parsing_error",
24
+ desc: "Token cannot be parsed. Please review stack trace to determine root cause."
25
+ },
26
+ nullOrEmptyToken: {
27
+ code: "null_or_empty_token",
28
+ desc: "The token is null or empty. Please review the trace to determine the root cause."
29
+ },
30
+ endpointResolutionError: {
31
+ code: "endpoints_resolution_error",
32
+ desc: "Error: could not resolve endpoints. Please check network and try again."
33
+ },
34
+ networkError: {
35
+ code: "network_error",
36
+ desc: "Network request failed. Please check network trace to determine root cause."
37
+ },
38
+ unableToGetOpenidConfigError: {
39
+ code: "openid_config_error",
40
+ desc: "Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints."
41
+ },
42
+ hashNotDeserialized: {
43
+ code: "hash_not_deserialized",
44
+ desc: "The hash parameters could not be deserialized. Please review the trace to determine the root cause."
45
+ },
46
+ blankGuidGenerated: {
47
+ code: "blank_guid_generated",
48
+ desc: "The guid generated was blank. Please review the trace to determine the root cause."
49
+ },
50
+ invalidStateError: {
51
+ code: "invalid_state",
52
+ desc: "State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState()."
53
+ },
54
+ stateMismatchError: {
55
+ code: "state_mismatch",
56
+ desc: "State mismatch error. Please check your network. Continued requests may cause cache overflow."
57
+ },
58
+ stateNotFoundError: {
59
+ code: "state_not_found",
60
+ desc: "State not found"
61
+ },
62
+ nonceMismatchError: {
63
+ code: "nonce_mismatch",
64
+ desc: "Nonce mismatch error. This may be caused by a race condition in concurrent requests."
65
+ },
66
+ nonceNotFoundError: {
67
+ code: "nonce_not_found",
68
+ desc: "nonce not found"
69
+ },
70
+ noTokensFoundError: {
71
+ code: "no_tokens_found",
72
+ desc: "No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken()."
73
+ },
74
+ multipleMatchingTokens: {
75
+ code: "multiple_matching_tokens",
76
+ desc: "The cache contains multiple tokens satisfying the requirements. " +
77
+ "Call AcquireToken again providing more requirements such as authority or account."
78
+ },
79
+ multipleMatchingAccounts: {
80
+ code: "multiple_matching_accounts",
81
+ desc: "The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account"
82
+ },
83
+ multipleMatchingAppMetadata: {
84
+ code: "multiple_matching_appMetadata",
85
+ desc: "The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata"
86
+ },
87
+ tokenRequestCannotBeMade: {
88
+ code: "request_cannot_be_made",
89
+ desc: "Token request cannot be made without authorization code or refresh token."
90
+ },
91
+ appendEmptyScopeError: {
92
+ code: "cannot_append_empty_scope",
93
+ desc: "Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info."
94
+ },
95
+ removeEmptyScopeError: {
96
+ code: "cannot_remove_empty_scope",
97
+ desc: "Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info."
98
+ },
99
+ appendScopeSetError: {
100
+ code: "cannot_append_scopeset",
101
+ desc: "Cannot append ScopeSet due to error."
102
+ },
103
+ emptyInputScopeSetError: {
104
+ code: "empty_input_scopeset",
105
+ desc: "Empty input ScopeSet cannot be processed."
106
+ },
107
+ DeviceCodePollingCancelled: {
108
+ code: "device_code_polling_cancelled",
109
+ desc: "Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true."
110
+ },
111
+ DeviceCodeExpired: {
112
+ code: "device_code_expired",
113
+ desc: "Device code is expired."
114
+ },
115
+ DeviceCodeUnknownError: {
116
+ code: "device_code_unknown_error",
117
+ desc: "Device code stopped polling for unknown reasons."
118
+ },
119
+ NoAccountInSilentRequest: {
120
+ code: "no_account_in_silent_request",
121
+ desc: "Please pass an account object, silent flow is not supported without account information"
122
+ },
123
+ invalidCacheRecord: {
124
+ code: "invalid_cache_record",
125
+ desc: "Cache record object was null or undefined."
126
+ },
127
+ invalidCacheEnvironment: {
128
+ code: "invalid_cache_environment",
129
+ desc: "Invalid environment when attempting to create cache entry"
130
+ },
131
+ noAccountFound: {
132
+ code: "no_account_found",
133
+ desc: "No account found in cache for given key."
134
+ },
135
+ CachePluginError: {
136
+ code: "no cache plugin set on CacheManager",
137
+ desc: "ICachePlugin needs to be set before using readFromStorage or writeFromStorage"
138
+ },
139
+ noCryptoObj: {
140
+ code: "no_crypto_object",
141
+ desc: "No crypto object detected. This is required for the following operation: "
142
+ },
143
+ invalidCacheType: {
144
+ code: "invalid_cache_type",
145
+ desc: "Invalid cache type"
146
+ },
147
+ unexpectedAccountType: {
148
+ code: "unexpected_account_type",
149
+ desc: "Unexpected account type."
150
+ },
151
+ unexpectedCredentialType: {
152
+ code: "unexpected_credential_type",
153
+ desc: "Unexpected credential type."
154
+ },
155
+ invalidAssertion: {
156
+ code: "invalid_assertion",
157
+ desc: "Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515"
158
+ },
159
+ invalidClientCredential: {
160
+ code: "invalid_client_credential",
161
+ desc: "Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential"
162
+ },
163
+ tokenRefreshRequired: {
164
+ code: "token_refresh_required",
165
+ desc: "Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired."
166
+ },
167
+ userTimeoutReached: {
168
+ code: "user_timeout_reached",
169
+ desc: "User defined timeout for device code polling reached",
170
+ },
171
+ tokenClaimsRequired: {
172
+ code: "token_claims_cnf_required_for_signedjwt",
173
+ desc: "Cannot generate a POP jwt if the token_claims are not populated"
174
+ },
175
+ noAuthorizationCodeFromServer: {
176
+ code: "authorization_code_missing_from_server_response",
177
+ desc: "Server response does not contain an authorization code to proceed"
178
+ },
179
+ noAzureRegionDetected: {
180
+ code: "no_azure_region_detected",
181
+ desc: "No azure region was detected and no fallback was made available"
182
+ },
183
+ accessTokenEntityNullError: {
184
+ code: "access_token_entity_null",
185
+ desc: "Access token entity is null, please check logs and cache to ensure a valid access token is present."
186
+ }
187
+ };
188
+ /**
189
+ * Error thrown when there is an error in the client code running on the browser.
190
+ */
191
+ var ClientAuthError = /** @class */ (function (_super) {
192
+ __extends(ClientAuthError, _super);
193
+ function ClientAuthError(errorCode, errorMessage) {
194
+ var _this = _super.call(this, errorCode, errorMessage) || this;
195
+ _this.name = "ClientAuthError";
196
+ Object.setPrototypeOf(_this, ClientAuthError.prototype);
197
+ return _this;
198
+ }
199
+ /**
200
+ * Creates an error thrown when client info object doesn't decode correctly.
201
+ * @param caughtError
202
+ */
203
+ ClientAuthError.createClientInfoDecodingError = function (caughtError) {
204
+ return new ClientAuthError(ClientAuthErrorMessage.clientInfoDecodingError.code, ClientAuthErrorMessage.clientInfoDecodingError.desc + " Failed with error: " + caughtError);
205
+ };
206
+ /**
207
+ * Creates an error thrown if the client info is empty.
208
+ * @param rawClientInfo
209
+ */
210
+ ClientAuthError.createClientInfoEmptyError = function () {
211
+ return new ClientAuthError(ClientAuthErrorMessage.clientInfoEmptyError.code, "" + ClientAuthErrorMessage.clientInfoEmptyError.desc);
212
+ };
213
+ /**
214
+ * Creates an error thrown when the id token extraction errors out.
215
+ * @param err
216
+ */
217
+ ClientAuthError.createTokenParsingError = function (caughtExtractionError) {
218
+ return new ClientAuthError(ClientAuthErrorMessage.tokenParsingError.code, ClientAuthErrorMessage.tokenParsingError.desc + " Failed with error: " + caughtExtractionError);
219
+ };
220
+ /**
221
+ * Creates an error thrown when the id token string is null or empty.
222
+ * @param invalidRawTokenString
223
+ */
224
+ ClientAuthError.createTokenNullOrEmptyError = function (invalidRawTokenString) {
225
+ return new ClientAuthError(ClientAuthErrorMessage.nullOrEmptyToken.code, ClientAuthErrorMessage.nullOrEmptyToken.desc + " Raw Token Value: " + invalidRawTokenString);
226
+ };
227
+ /**
228
+ * Creates an error thrown when the endpoint discovery doesn't complete correctly.
229
+ */
230
+ ClientAuthError.createEndpointDiscoveryIncompleteError = function (errDetail) {
231
+ return new ClientAuthError(ClientAuthErrorMessage.endpointResolutionError.code, ClientAuthErrorMessage.endpointResolutionError.desc + " Detail: " + errDetail);
232
+ };
233
+ /**
234
+ * Creates an error thrown when the fetch client throws
235
+ */
236
+ ClientAuthError.createNetworkError = function (endpoint, errDetail) {
237
+ return new ClientAuthError(ClientAuthErrorMessage.networkError.code, ClientAuthErrorMessage.networkError.desc + " | Fetch client threw: " + errDetail + " | Attempted to reach: " + endpoint.split("?")[0]);
238
+ };
239
+ /**
240
+ * Creates an error thrown when the openid-configuration endpoint cannot be reached or does not contain the required data
241
+ */
242
+ ClientAuthError.createUnableToGetOpenidConfigError = function (errDetail) {
243
+ return new ClientAuthError(ClientAuthErrorMessage.unableToGetOpenidConfigError.code, ClientAuthErrorMessage.unableToGetOpenidConfigError.desc + " Attempted to retrieve endpoints from: " + errDetail);
244
+ };
245
+ /**
246
+ * Creates an error thrown when the hash cannot be deserialized.
247
+ * @param hashParamObj
248
+ */
249
+ ClientAuthError.createHashNotDeserializedError = function (hashParamObj) {
250
+ return new ClientAuthError(ClientAuthErrorMessage.hashNotDeserialized.code, ClientAuthErrorMessage.hashNotDeserialized.desc + " Given Object: " + hashParamObj);
251
+ };
252
+ /**
253
+ * Creates an error thrown when the state cannot be parsed.
254
+ * @param invalidState
255
+ */
256
+ ClientAuthError.createInvalidStateError = function (invalidState, errorString) {
257
+ return new ClientAuthError(ClientAuthErrorMessage.invalidStateError.code, ClientAuthErrorMessage.invalidStateError.desc + " Invalid State: " + invalidState + ", Root Err: " + errorString);
258
+ };
259
+ /**
260
+ * Creates an error thrown when two states do not match.
261
+ */
262
+ ClientAuthError.createStateMismatchError = function () {
263
+ return new ClientAuthError(ClientAuthErrorMessage.stateMismatchError.code, ClientAuthErrorMessage.stateMismatchError.desc);
264
+ };
265
+ /**
266
+ * Creates an error thrown when the state is not present
267
+ * @param missingState
268
+ */
269
+ ClientAuthError.createStateNotFoundError = function (missingState) {
270
+ return new ClientAuthError(ClientAuthErrorMessage.stateNotFoundError.code, ClientAuthErrorMessage.stateNotFoundError.desc + ": " + missingState);
271
+ };
272
+ /**
273
+ * Creates an error thrown when the nonce does not match.
274
+ */
275
+ ClientAuthError.createNonceMismatchError = function () {
276
+ return new ClientAuthError(ClientAuthErrorMessage.nonceMismatchError.code, ClientAuthErrorMessage.nonceMismatchError.desc);
277
+ };
278
+ /**
279
+ * Creates an error thrown when the mnonce is not present
280
+ * @param missingNonce
281
+ */
282
+ ClientAuthError.createNonceNotFoundError = function (missingNonce) {
283
+ return new ClientAuthError(ClientAuthErrorMessage.nonceNotFoundError.code, ClientAuthErrorMessage.nonceNotFoundError.desc + ": " + missingNonce);
284
+ };
285
+ /**
286
+ * Creates an error thrown when the authorization code required for a token request is null or empty.
287
+ */
288
+ ClientAuthError.createNoTokensFoundError = function () {
289
+ return new ClientAuthError(ClientAuthErrorMessage.noTokensFoundError.code, ClientAuthErrorMessage.noTokensFoundError.desc);
290
+ };
291
+ /**
292
+ * Throws error when multiple tokens are in cache.
293
+ */
294
+ ClientAuthError.createMultipleMatchingTokensInCacheError = function () {
295
+ return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingTokens.code, ClientAuthErrorMessage.multipleMatchingTokens.desc + ".");
296
+ };
297
+ /**
298
+ * Throws error when multiple accounts are in cache for the given params
299
+ */
300
+ ClientAuthError.createMultipleMatchingAccountsInCacheError = function () {
301
+ return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingAccounts.code, ClientAuthErrorMessage.multipleMatchingAccounts.desc);
302
+ };
303
+ /**
304
+ * Throws error when multiple appMetada are in cache for the given clientId.
305
+ */
306
+ ClientAuthError.createMultipleMatchingAppMetadataInCacheError = function () {
307
+ return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingAppMetadata.code, ClientAuthErrorMessage.multipleMatchingAppMetadata.desc);
308
+ };
309
+ /**
310
+ * Throws error when no auth code or refresh token is given to ServerTokenRequestParameters.
311
+ */
312
+ ClientAuthError.createTokenRequestCannotBeMadeError = function () {
313
+ return new ClientAuthError(ClientAuthErrorMessage.tokenRequestCannotBeMade.code, ClientAuthErrorMessage.tokenRequestCannotBeMade.desc);
314
+ };
315
+ /**
316
+ * Throws error when attempting to append a null, undefined or empty scope to a set
317
+ * @param givenScope
318
+ */
319
+ ClientAuthError.createAppendEmptyScopeToSetError = function (givenScope) {
320
+ return new ClientAuthError(ClientAuthErrorMessage.appendEmptyScopeError.code, ClientAuthErrorMessage.appendEmptyScopeError.desc + " Given Scope: " + givenScope);
321
+ };
322
+ /**
323
+ * Throws error when attempting to append a null, undefined or empty scope to a set
324
+ * @param givenScope
325
+ */
326
+ ClientAuthError.createRemoveEmptyScopeFromSetError = function (givenScope) {
327
+ return new ClientAuthError(ClientAuthErrorMessage.removeEmptyScopeError.code, ClientAuthErrorMessage.removeEmptyScopeError.desc + " Given Scope: " + givenScope);
328
+ };
329
+ /**
330
+ * Throws error when attempting to append null or empty ScopeSet.
331
+ * @param appendError
332
+ */
333
+ ClientAuthError.createAppendScopeSetError = function (appendError) {
334
+ return new ClientAuthError(ClientAuthErrorMessage.appendScopeSetError.code, ClientAuthErrorMessage.appendScopeSetError.desc + " Detail Error: " + appendError);
335
+ };
336
+ /**
337
+ * Throws error if ScopeSet is null or undefined.
338
+ * @param givenScopeSet
339
+ */
340
+ ClientAuthError.createEmptyInputScopeSetError = function () {
341
+ return new ClientAuthError(ClientAuthErrorMessage.emptyInputScopeSetError.code, "" + ClientAuthErrorMessage.emptyInputScopeSetError.desc);
342
+ };
343
+ /**
344
+ * Throws error if user sets CancellationToken.cancel = true during polling of token endpoint during device code flow
345
+ */
346
+ ClientAuthError.createDeviceCodeCancelledError = function () {
347
+ return new ClientAuthError(ClientAuthErrorMessage.DeviceCodePollingCancelled.code, "" + ClientAuthErrorMessage.DeviceCodePollingCancelled.desc);
348
+ };
349
+ /**
350
+ * Throws error if device code is expired
351
+ */
352
+ ClientAuthError.createDeviceCodeExpiredError = function () {
353
+ return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeExpired.code, "" + ClientAuthErrorMessage.DeviceCodeExpired.desc);
354
+ };
355
+ /**
356
+ * Throws error if device code is expired
357
+ */
358
+ ClientAuthError.createDeviceCodeUnknownError = function () {
359
+ return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeUnknownError.code, "" + ClientAuthErrorMessage.DeviceCodeUnknownError.desc);
360
+ };
361
+ /**
362
+ * Throws error when silent requests are made without an account object
363
+ */
364
+ ClientAuthError.createNoAccountInSilentRequestError = function () {
365
+ return new ClientAuthError(ClientAuthErrorMessage.NoAccountInSilentRequest.code, "" + ClientAuthErrorMessage.NoAccountInSilentRequest.desc);
366
+ };
367
+ /**
368
+ * Throws error when cache record is null or undefined.
369
+ */
370
+ ClientAuthError.createNullOrUndefinedCacheRecord = function () {
371
+ return new ClientAuthError(ClientAuthErrorMessage.invalidCacheRecord.code, ClientAuthErrorMessage.invalidCacheRecord.desc);
372
+ };
373
+ /**
374
+ * Throws error when provided environment is not part of the CloudDiscoveryMetadata object
375
+ */
376
+ ClientAuthError.createInvalidCacheEnvironmentError = function () {
377
+ return new ClientAuthError(ClientAuthErrorMessage.invalidCacheEnvironment.code, ClientAuthErrorMessage.invalidCacheEnvironment.desc);
378
+ };
379
+ /**
380
+ * Throws error when account is not found in cache.
381
+ */
382
+ ClientAuthError.createNoAccountFoundError = function () {
383
+ return new ClientAuthError(ClientAuthErrorMessage.noAccountFound.code, ClientAuthErrorMessage.noAccountFound.desc);
384
+ };
385
+ /**
386
+ * Throws error if ICachePlugin not set on CacheManager.
387
+ */
388
+ ClientAuthError.createCachePluginError = function () {
389
+ return new ClientAuthError(ClientAuthErrorMessage.CachePluginError.code, "" + ClientAuthErrorMessage.CachePluginError.desc);
390
+ };
391
+ /**
392
+ * Throws error if crypto object not found.
393
+ * @param operationName
394
+ */
395
+ ClientAuthError.createNoCryptoObjectError = function (operationName) {
396
+ return new ClientAuthError(ClientAuthErrorMessage.noCryptoObj.code, "" + ClientAuthErrorMessage.noCryptoObj.desc + operationName);
397
+ };
398
+ /**
399
+ * Throws error if cache type is invalid.
400
+ */
401
+ ClientAuthError.createInvalidCacheTypeError = function () {
402
+ return new ClientAuthError(ClientAuthErrorMessage.invalidCacheType.code, "" + ClientAuthErrorMessage.invalidCacheType.desc);
403
+ };
404
+ /**
405
+ * Throws error if unexpected account type.
406
+ */
407
+ ClientAuthError.createUnexpectedAccountTypeError = function () {
408
+ return new ClientAuthError(ClientAuthErrorMessage.unexpectedAccountType.code, "" + ClientAuthErrorMessage.unexpectedAccountType.desc);
409
+ };
410
+ /**
411
+ * Throws error if unexpected credential type.
412
+ */
413
+ ClientAuthError.createUnexpectedCredentialTypeError = function () {
414
+ return new ClientAuthError(ClientAuthErrorMessage.unexpectedCredentialType.code, "" + ClientAuthErrorMessage.unexpectedCredentialType.desc);
415
+ };
416
+ /**
417
+ * Throws error if client assertion is not valid.
418
+ */
419
+ ClientAuthError.createInvalidAssertionError = function () {
420
+ return new ClientAuthError(ClientAuthErrorMessage.invalidAssertion.code, "" + ClientAuthErrorMessage.invalidAssertion.desc);
421
+ };
422
+ /**
423
+ * Throws error if client assertion is not valid.
424
+ */
425
+ ClientAuthError.createInvalidCredentialError = function () {
426
+ return new ClientAuthError(ClientAuthErrorMessage.invalidClientCredential.code, "" + ClientAuthErrorMessage.invalidClientCredential.desc);
427
+ };
428
+ /**
429
+ * Throws error if token cannot be retrieved from cache due to refresh being required.
430
+ */
431
+ ClientAuthError.createRefreshRequiredError = function () {
432
+ return new ClientAuthError(ClientAuthErrorMessage.tokenRefreshRequired.code, ClientAuthErrorMessage.tokenRefreshRequired.desc);
433
+ };
434
+ /**
435
+ * Throws error if the user defined timeout is reached.
436
+ */
437
+ ClientAuthError.createUserTimeoutReachedError = function () {
438
+ return new ClientAuthError(ClientAuthErrorMessage.userTimeoutReached.code, ClientAuthErrorMessage.userTimeoutReached.desc);
439
+ };
440
+ /*
441
+ * Throws error if token claims are not populated for a signed jwt generation
442
+ */
443
+ ClientAuthError.createTokenClaimsRequiredError = function () {
444
+ return new ClientAuthError(ClientAuthErrorMessage.tokenClaimsRequired.code, ClientAuthErrorMessage.tokenClaimsRequired.desc);
445
+ };
446
+ /**
447
+ * Throws error when the authorization code is missing from the server response
448
+ */
449
+ ClientAuthError.createNoAuthCodeInServerResponseError = function () {
450
+ return new ClientAuthError(ClientAuthErrorMessage.noAuthorizationCodeFromServer.code, ClientAuthErrorMessage.noAuthorizationCodeFromServer.desc);
451
+ };
452
+ return ClientAuthError;
453
+ }(AuthError));
454
+
455
+ export { ClientAuthError, ClientAuthErrorMessage };
456
+ //# sourceMappingURL=ClientAuthError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientAuthError.js","sources":["../../src/error/ClientAuthError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthError } from \"./AuthError\";\n\n/**\n * ClientAuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const ClientAuthErrorMessage = {\n clientInfoDecodingError: {\n code: \"client_info_decoding_error\",\n desc: \"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause.\"\n },\n clientInfoEmptyError: {\n code: \"client_info_empty_error\",\n desc: \"The client info was empty. Please review the trace to determine the root cause.\"\n },\n tokenParsingError: {\n code: \"token_parsing_error\",\n desc: \"Token cannot be parsed. Please review stack trace to determine root cause.\"\n },\n nullOrEmptyToken: {\n code: \"null_or_empty_token\",\n desc: \"The token is null or empty. Please review the trace to determine the root cause.\"\n },\n endpointResolutionError: {\n code: \"endpoints_resolution_error\",\n desc: \"Error: could not resolve endpoints. Please check network and try again.\"\n },\n networkError: {\n code: \"network_error\",\n desc: \"Network request failed. Please check network trace to determine root cause.\"\n },\n unableToGetOpenidConfigError: {\n code: \"openid_config_error\",\n desc: \"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.\"\n },\n hashNotDeserialized: {\n code: \"hash_not_deserialized\",\n desc: \"The hash parameters could not be deserialized. Please review the trace to determine the root cause.\"\n },\n blankGuidGenerated: {\n code: \"blank_guid_generated\",\n desc: \"The guid generated was blank. Please review the trace to determine the root cause.\"\n },\n invalidStateError: {\n code: \"invalid_state\",\n desc: \"State was not the expected format. Please check the logs to determine whether the request was sent using ProtocolUtils.setRequestState().\"\n },\n stateMismatchError: {\n code: \"state_mismatch\",\n desc: \"State mismatch error. Please check your network. Continued requests may cause cache overflow.\"\n },\n stateNotFoundError: {\n code: \"state_not_found\",\n desc: \"State not found\"\n },\n nonceMismatchError: {\n code: \"nonce_mismatch\",\n desc: \"Nonce mismatch error. This may be caused by a race condition in concurrent requests.\"\n },\n nonceNotFoundError: {\n code: \"nonce_not_found\",\n desc: \"nonce not found\"\n },\n noTokensFoundError: {\n code: \"no_tokens_found\",\n desc: \"No tokens were found for the given scopes, and no authorization code was passed to acquireToken. You must retrieve an authorization code before making a call to acquireToken().\"\n },\n multipleMatchingTokens: {\n code: \"multiple_matching_tokens\",\n desc: \"The cache contains multiple tokens satisfying the requirements. \" +\n \"Call AcquireToken again providing more requirements such as authority or account.\"\n },\n multipleMatchingAccounts: {\n code: \"multiple_matching_accounts\",\n desc: \"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account\"\n },\n multipleMatchingAppMetadata: {\n code: \"multiple_matching_appMetadata\",\n desc: \"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata\"\n },\n tokenRequestCannotBeMade: {\n code: \"request_cannot_be_made\",\n desc: \"Token request cannot be made without authorization code or refresh token.\"\n },\n appendEmptyScopeError: {\n code: \"cannot_append_empty_scope\",\n desc: \"Cannot append null or empty scope to ScopeSet. Please check the stack trace for more info.\"\n },\n removeEmptyScopeError: {\n code: \"cannot_remove_empty_scope\",\n desc: \"Cannot remove null or empty scope from ScopeSet. Please check the stack trace for more info.\"\n },\n appendScopeSetError: {\n code: \"cannot_append_scopeset\",\n desc: \"Cannot append ScopeSet due to error.\"\n },\n emptyInputScopeSetError: {\n code: \"empty_input_scopeset\",\n desc: \"Empty input ScopeSet cannot be processed.\"\n },\n DeviceCodePollingCancelled: {\n code: \"device_code_polling_cancelled\",\n desc: \"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.\"\n },\n DeviceCodeExpired: {\n code: \"device_code_expired\",\n desc: \"Device code is expired.\"\n },\n DeviceCodeUnknownError: {\n code: \"device_code_unknown_error\",\n desc: \"Device code stopped polling for unknown reasons.\"\n },\n NoAccountInSilentRequest: {\n code: \"no_account_in_silent_request\",\n desc: \"Please pass an account object, silent flow is not supported without account information\"\n },\n invalidCacheRecord: {\n code: \"invalid_cache_record\",\n desc: \"Cache record object was null or undefined.\"\n },\n invalidCacheEnvironment: {\n code: \"invalid_cache_environment\",\n desc: \"Invalid environment when attempting to create cache entry\"\n },\n noAccountFound: {\n code: \"no_account_found\",\n desc: \"No account found in cache for given key.\"\n },\n CachePluginError: {\n code: \"no cache plugin set on CacheManager\",\n desc: \"ICachePlugin needs to be set before using readFromStorage or writeFromStorage\"\n },\n noCryptoObj: {\n code: \"no_crypto_object\",\n desc: \"No crypto object detected. This is required for the following operation: \"\n },\n invalidCacheType: {\n code: \"invalid_cache_type\",\n desc: \"Invalid cache type\"\n },\n unexpectedAccountType: {\n code: \"unexpected_account_type\",\n desc: \"Unexpected account type.\"\n },\n unexpectedCredentialType: {\n code: \"unexpected_credential_type\",\n desc: \"Unexpected credential type.\"\n },\n invalidAssertion: {\n code: \"invalid_assertion\",\n desc: \"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515\"\n },\n invalidClientCredential: {\n code: \"invalid_client_credential\",\n desc: \"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential\"\n },\n tokenRefreshRequired: {\n code: \"token_refresh_required\",\n desc: \"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.\"\n },\n userTimeoutReached: {\n code: \"user_timeout_reached\",\n desc: \"User defined timeout for device code polling reached\",\n },\n tokenClaimsRequired: {\n code: \"token_claims_cnf_required_for_signedjwt\",\n desc: \"Cannot generate a POP jwt if the token_claims are not populated\"\n },\n noAuthorizationCodeFromServer: {\n code: \"authorization_code_missing_from_server_response\",\n desc: \"Server response does not contain an authorization code to proceed\"\n },\n noAzureRegionDetected: {\n code: \"no_azure_region_detected\",\n desc: \"No azure region was detected and no fallback was made available\"\n },\n accessTokenEntityNullError: {\n code: \"access_token_entity_null\",\n desc: \"Access token entity is null, please check logs and cache to ensure a valid access token is present.\"\n }\n};\n\n/**\n * Error thrown when there is an error in the client code running on the browser.\n */\nexport class ClientAuthError extends AuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"ClientAuthError\";\n\n Object.setPrototypeOf(this, ClientAuthError.prototype);\n }\n\n /**\n * Creates an error thrown when client info object doesn't decode correctly.\n * @param caughtError\n */\n static createClientInfoDecodingError(caughtError: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.clientInfoDecodingError.code,\n `${ClientAuthErrorMessage.clientInfoDecodingError.desc} Failed with error: ${caughtError}`);\n }\n\n /**\n * Creates an error thrown if the client info is empty.\n * @param rawClientInfo\n */\n static createClientInfoEmptyError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.clientInfoEmptyError.code,\n `${ClientAuthErrorMessage.clientInfoEmptyError.desc}`);\n }\n\n /**\n * Creates an error thrown when the id token extraction errors out.\n * @param err\n */\n static createTokenParsingError(caughtExtractionError: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenParsingError.code,\n `${ClientAuthErrorMessage.tokenParsingError.desc} Failed with error: ${caughtExtractionError}`);\n }\n\n /**\n * Creates an error thrown when the id token string is null or empty.\n * @param invalidRawTokenString\n */\n static createTokenNullOrEmptyError(invalidRawTokenString: string) : ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.nullOrEmptyToken.code,\n `${ClientAuthErrorMessage.nullOrEmptyToken.desc} Raw Token Value: ${invalidRawTokenString}`);\n }\n\n /**\n * Creates an error thrown when the endpoint discovery doesn't complete correctly.\n */\n static createEndpointDiscoveryIncompleteError(errDetail: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.endpointResolutionError.code,\n `${ClientAuthErrorMessage.endpointResolutionError.desc} Detail: ${errDetail}`);\n }\n\n /**\n * Creates an error thrown when the fetch client throws\n */\n static createNetworkError(endpoint: string, errDetail: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.networkError.code,\n `${ClientAuthErrorMessage.networkError.desc} | Fetch client threw: ${errDetail} | Attempted to reach: ${endpoint.split(\"?\")[0]}`);\n }\n\n /**\n * Creates an error thrown when the openid-configuration endpoint cannot be reached or does not contain the required data\n */\n static createUnableToGetOpenidConfigError(errDetail: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.unableToGetOpenidConfigError.code,\n `${ClientAuthErrorMessage.unableToGetOpenidConfigError.desc} Attempted to retrieve endpoints from: ${errDetail}`);\n }\n\n /**\n * Creates an error thrown when the hash cannot be deserialized.\n * @param hashParamObj\n */\n static createHashNotDeserializedError(hashParamObj: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.hashNotDeserialized.code,\n `${ClientAuthErrorMessage.hashNotDeserialized.desc} Given Object: ${hashParamObj}`);\n }\n\n /**\n * Creates an error thrown when the state cannot be parsed.\n * @param invalidState\n */\n static createInvalidStateError(invalidState: string, errorString?: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidStateError.code,\n `${ClientAuthErrorMessage.invalidStateError.desc} Invalid State: ${invalidState}, Root Err: ${errorString}`);\n }\n\n /**\n * Creates an error thrown when two states do not match.\n */\n static createStateMismatchError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.stateMismatchError.code,\n ClientAuthErrorMessage.stateMismatchError.desc);\n }\n\n /**\n * Creates an error thrown when the state is not present\n * @param missingState\n */\n static createStateNotFoundError(missingState: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.stateNotFoundError.code,\n `${ClientAuthErrorMessage.stateNotFoundError.desc}: ${missingState}`);\n }\n\n /**\n * Creates an error thrown when the nonce does not match.\n */\n static createNonceMismatchError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.nonceMismatchError.code,\n ClientAuthErrorMessage.nonceMismatchError.desc);\n }\n\n /**\n * Creates an error thrown when the mnonce is not present\n * @param missingNonce\n */\n static createNonceNotFoundError(missingNonce: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.nonceNotFoundError.code,\n `${ClientAuthErrorMessage.nonceNotFoundError.desc}: ${missingNonce}`);\n }\n\n /**\n * Creates an error thrown when the authorization code required for a token request is null or empty.\n */\n static createNoTokensFoundError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.noTokensFoundError.code, ClientAuthErrorMessage.noTokensFoundError.desc);\n }\n\n /**\n * Throws error when multiple tokens are in cache.\n */\n static createMultipleMatchingTokensInCacheError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingTokens.code,\n `${ClientAuthErrorMessage.multipleMatchingTokens.desc}.`);\n }\n\n /**\n * Throws error when multiple accounts are in cache for the given params\n */\n static createMultipleMatchingAccountsInCacheError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingAccounts.code,\n ClientAuthErrorMessage.multipleMatchingAccounts.desc);\n }\n\n /**\n * Throws error when multiple appMetada are in cache for the given clientId.\n */\n static createMultipleMatchingAppMetadataInCacheError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.multipleMatchingAppMetadata.code,\n ClientAuthErrorMessage.multipleMatchingAppMetadata.desc);\n }\n\n /**\n * Throws error when no auth code or refresh token is given to ServerTokenRequestParameters.\n */\n static createTokenRequestCannotBeMadeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenRequestCannotBeMade.code, ClientAuthErrorMessage.tokenRequestCannotBeMade.desc);\n }\n\n /**\n * Throws error when attempting to append a null, undefined or empty scope to a set\n * @param givenScope\n */\n static createAppendEmptyScopeToSetError(givenScope: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.appendEmptyScopeError.code, `${ClientAuthErrorMessage.appendEmptyScopeError.desc} Given Scope: ${givenScope}`);\n }\n\n /**\n * Throws error when attempting to append a null, undefined or empty scope to a set\n * @param givenScope\n */\n static createRemoveEmptyScopeFromSetError(givenScope: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.removeEmptyScopeError.code, `${ClientAuthErrorMessage.removeEmptyScopeError.desc} Given Scope: ${givenScope}`);\n }\n\n /**\n * Throws error when attempting to append null or empty ScopeSet.\n * @param appendError\n */\n static createAppendScopeSetError(appendError: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.appendScopeSetError.code, `${ClientAuthErrorMessage.appendScopeSetError.desc} Detail Error: ${appendError}`);\n }\n\n /**\n * Throws error if ScopeSet is null or undefined.\n * @param givenScopeSet\n */\n static createEmptyInputScopeSetError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.emptyInputScopeSetError.code, `${ClientAuthErrorMessage.emptyInputScopeSetError.desc}`);\n }\n\n /**\n * Throws error if user sets CancellationToken.cancel = true during polling of token endpoint during device code flow\n */\n static createDeviceCodeCancelledError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.DeviceCodePollingCancelled.code, `${ClientAuthErrorMessage.DeviceCodePollingCancelled.desc}`);\n }\n\n /**\n * Throws error if device code is expired\n */\n static createDeviceCodeExpiredError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeExpired.code, `${ClientAuthErrorMessage.DeviceCodeExpired.desc}`);\n }\n\n /**\n * Throws error if device code is expired\n */\n static createDeviceCodeUnknownError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeUnknownError.code, `${ClientAuthErrorMessage.DeviceCodeUnknownError.desc}`);\n }\n\n /**\n * Throws error when silent requests are made without an account object\n */\n static createNoAccountInSilentRequestError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.NoAccountInSilentRequest.code, `${ClientAuthErrorMessage.NoAccountInSilentRequest.desc}`);\n }\n\n /**\n * Throws error when cache record is null or undefined.\n */\n static createNullOrUndefinedCacheRecord(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidCacheRecord.code, ClientAuthErrorMessage.invalidCacheRecord.desc);\n }\n\n /**\n * Throws error when provided environment is not part of the CloudDiscoveryMetadata object\n */\n static createInvalidCacheEnvironmentError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidCacheEnvironment.code, ClientAuthErrorMessage.invalidCacheEnvironment.desc);\n }\n\n /**\n * Throws error when account is not found in cache.\n */\n static createNoAccountFoundError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.noAccountFound.code, ClientAuthErrorMessage.noAccountFound.desc);\n }\n\n /**\n * Throws error if ICachePlugin not set on CacheManager.\n */\n static createCachePluginError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.CachePluginError.code, `${ClientAuthErrorMessage.CachePluginError.desc}`);\n }\n\n /**\n * Throws error if crypto object not found.\n * @param operationName\n */\n static createNoCryptoObjectError(operationName: string): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.noCryptoObj.code, `${ClientAuthErrorMessage.noCryptoObj.desc}${operationName}`);\n }\n\n /**\n * Throws error if cache type is invalid.\n */\n static createInvalidCacheTypeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidCacheType.code, `${ClientAuthErrorMessage.invalidCacheType.desc}`);\n }\n\n /**\n * Throws error if unexpected account type.\n */\n static createUnexpectedAccountTypeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.unexpectedAccountType.code, `${ClientAuthErrorMessage.unexpectedAccountType.desc}`);\n }\n\n /**\n * Throws error if unexpected credential type.\n */\n static createUnexpectedCredentialTypeError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.unexpectedCredentialType.code, `${ClientAuthErrorMessage.unexpectedCredentialType.desc}`);\n }\n\n /**\n * Throws error if client assertion is not valid.\n */\n static createInvalidAssertionError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidAssertion.code, `${ClientAuthErrorMessage.invalidAssertion.desc}`);\n }\n\n /**\n * Throws error if client assertion is not valid.\n */\n static createInvalidCredentialError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.invalidClientCredential.code, `${ClientAuthErrorMessage.invalidClientCredential.desc}`);\n }\n\n /**\n * Throws error if token cannot be retrieved from cache due to refresh being required.\n */\n static createRefreshRequiredError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenRefreshRequired.code, ClientAuthErrorMessage.tokenRefreshRequired.desc);\n }\n\n /**\n * Throws error if the user defined timeout is reached.\n */\n static createUserTimeoutReachedError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.userTimeoutReached.code, ClientAuthErrorMessage.userTimeoutReached.desc);\n }\n\n /*\n * Throws error if token claims are not populated for a signed jwt generation\n */\n static createTokenClaimsRequiredError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.tokenClaimsRequired.code, ClientAuthErrorMessage.tokenClaimsRequired.desc);\n }\n\n /**\n * Throws error when the authorization code is missing from the server response\n */\n static createNoAuthCodeInServerResponseError(): ClientAuthError {\n return new ClientAuthError(ClientAuthErrorMessage.noAuthorizationCodeFromServer.code, ClientAuthErrorMessage.noAuthorizationCodeFromServer.desc);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAOA;;;IAGa,sBAAsB,GAAG;IAClC,uBAAuB,EAAE;QACrB,IAAI,EAAE,4BAA4B;QAClC,IAAI,EAAE,6GAA6G;KACtH;IACD,oBAAoB,EAAE;QAClB,IAAI,EAAE,yBAAyB;QAC/B,IAAI,EAAE,iFAAiF;KAC1F;IACD,iBAAiB,EAAE;QACf,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,4EAA4E;KACrF;IACD,gBAAgB,EAAE;QACd,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,kFAAkF;KAC3F;IACD,uBAAuB,EAAE;QACrB,IAAI,EAAE,4BAA4B;QAClC,IAAI,EAAE,yEAAyE;KAClF;IACD,YAAY,EAAE;QACV,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,6EAA6E;KACtF;IACD,4BAA4B,EAAE;QAC1B,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,6IAA6I;KACtJ;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,qGAAqG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CAAC,wBAAwB,CAAC,IAAM,CAAC,CAAC;KAC/I;;;;IAKM,2CAA2B,GAAlC;QACI,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAG,sBAAsB,CAAC,gBAAgB,CAAC,IAAM,CAAC,CAAC;KAC/H;;;;IAKM,4CAA4B,GAAnC;QACI,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,IAAI,EAAE,KAAG,sBAAsB,CAAC,uBAAuB,CAAC,IAAM,CAAC,CAAC;KAC7I;;;;IAKM,0CAA0B,GAAjC;QACI,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,IAAI,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;KAClI;;;;IAKM,6CAA6B,GAApC;QACI,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAC9H;;;;IAKM,8CAA8B,GAArC;QACI,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,IAAI,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;KAChI;;;;IAKM,qDAAqC,GAA5C;QACI,OAAO,IAAI,eAAe,CAAC,sBAAsB,CAAC,6BAA6B,CAAC,IAAI,EAAE,sBAAsB,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;KACpJ;IACL,sBAAC;AAAD,CA7TA,CAAqC,SAAS;;;;"}
@@ -108,16 +108,11 @@ export declare class ClientConfigurationError extends ClientAuthError {
108
108
  * @param urlString
109
109
  */
110
110
  static createUrlEmptyError(): ClientConfigurationError;
111
- /**
112
- * Error thrown when scopes are not an array
113
- * @param inputScopes
114
- */
115
- static createScopesNonArrayError(inputScopes: Array<string>): ClientConfigurationError;
116
111
  /**
117
112
  * Error thrown when scopes are empty.
118
113
  * @param scopesValue
119
114
  */
120
- static createEmptyScopesArrayError(inputScopes: Array<string>): ClientConfigurationError;
115
+ static createEmptyScopesArrayError(): ClientConfigurationError;
121
116
  /**
122
117
  * Error thrown when client id scope is not provided as single scope.
123
118
  * @param inputScopes
@@ -1 +1 @@
1
- {"version":3,"file":"ClientConfigurationError.d.ts","sourceRoot":"","sources":["../../src/error/ClientConfigurationError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyE3C,CAAC;AAEF;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,eAAe;gBAE7C,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMpD;;OAEG;IACH,MAAM,CAAC,2BAA2B,IAAI,wBAAwB;IAK9D;;OAEG;IACH,MAAM,CAAC,qCAAqC,IAAI,wBAAwB;IAKxE;;OAEG;IACH,MAAM,CAAC,+BAA+B,CAAC,uBAAuB,EAAE,MAAM,GAAG,wBAAwB;IAKjG;;;OAGG;IACH,MAAM,CAAC,+BAA+B,CAAC,SAAS,EAAE,MAAM,GAAG,wBAAwB;IAKnF;;;OAGG;IACH,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,wBAAwB;IAK3E;;;OAGG;IACH,MAAM,CAAC,mBAAmB,IAAI,wBAAwB;IAKtD;;;OAGG;IACH,MAAM,CAAC,yBAAyB,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,wBAAwB;IAKtF;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,wBAAwB;IAKxF;;;OAGG;IACH,MAAM,CAAC,8BAA8B,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM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