@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,210 @@
1
+ /*! @azure/msal-common v4.5.1 2021-08-02 */
2
+ 'use strict';
3
+ import { __extends } from '../_virtual/_tslib.js';
4
+ import { ClientAuthError } from './ClientAuthError.js';
5
+
6
+ /*
7
+ * Copyright (c) Microsoft Corporation. All rights reserved.
8
+ * Licensed under the MIT License.
9
+ */
10
+ /**
11
+ * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.
12
+ */
13
+ var ClientConfigurationErrorMessage = {
14
+ redirectUriNotSet: {
15
+ code: "redirect_uri_empty",
16
+ desc: "A redirect URI is required for all calls, and none has been set."
17
+ },
18
+ postLogoutUriNotSet: {
19
+ code: "post_logout_uri_empty",
20
+ desc: "A post logout redirect has not been set."
21
+ },
22
+ claimsRequestParsingError: {
23
+ code: "claims_request_parsing_error",
24
+ desc: "Could not parse the given claims request object."
25
+ },
26
+ authorityUriInsecure: {
27
+ code: "authority_uri_insecure",
28
+ desc: "Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options"
29
+ },
30
+ urlParseError: {
31
+ code: "url_parse_error",
32
+ desc: "URL could not be parsed into appropriate segments."
33
+ },
34
+ urlEmptyError: {
35
+ code: "empty_url_error",
36
+ desc: "URL was empty or null."
37
+ },
38
+ emptyScopesError: {
39
+ code: "empty_input_scopes_error",
40
+ desc: "Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token."
41
+ },
42
+ nonArrayScopesError: {
43
+ code: "nonarray_input_scopes_error",
44
+ desc: "Scopes cannot be passed as non-array."
45
+ },
46
+ clientIdSingleScopeError: {
47
+ code: "clientid_input_scopes_error",
48
+ desc: "Client ID can only be provided as a single scope."
49
+ },
50
+ invalidPrompt: {
51
+ code: "invalid_prompt_value",
52
+ desc: "Supported prompt values are 'login', 'select_account', 'consent', 'create' and 'none'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",
53
+ },
54
+ invalidClaimsRequest: {
55
+ code: "invalid_claims",
56
+ desc: "Given claims parameter must be a stringified JSON object."
57
+ },
58
+ tokenRequestEmptyError: {
59
+ code: "token_request_empty",
60
+ desc: "Token request was empty and not found in cache."
61
+ },
62
+ logoutRequestEmptyError: {
63
+ code: "logout_request_empty",
64
+ desc: "The logout request was null or undefined."
65
+ },
66
+ invalidCodeChallengeMethod: {
67
+ code: "invalid_code_challenge_method",
68
+ desc: "code_challenge_method passed is invalid. Valid values are \"plain\" and \"S256\"."
69
+ },
70
+ invalidCodeChallengeParams: {
71
+ code: "pkce_params_missing",
72
+ desc: "Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request"
73
+ },
74
+ invalidCloudDiscoveryMetadata: {
75
+ code: "invalid_cloud_discovery_metadata",
76
+ desc: "Invalid cloudDiscoveryMetadata provided. Must be a JSON object containing tenant_discovery_endpoint and metadata fields"
77
+ },
78
+ invalidAuthorityMetadata: {
79
+ code: "invalid_authority_metadata",
80
+ desc: "Invalid authorityMetadata provided. Must by a JSON object containing authorization_endpoint, token_endpoint, end_session_endpoint, issuer fields."
81
+ },
82
+ untrustedAuthority: {
83
+ code: "untrusted_authority",
84
+ desc: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter."
85
+ }
86
+ };
87
+ /**
88
+ * Error thrown when there is an error in configuration of the MSAL.js library.
89
+ */
90
+ var ClientConfigurationError = /** @class */ (function (_super) {
91
+ __extends(ClientConfigurationError, _super);
92
+ function ClientConfigurationError(errorCode, errorMessage) {
93
+ var _this = _super.call(this, errorCode, errorMessage) || this;
94
+ _this.name = "ClientConfigurationError";
95
+ Object.setPrototypeOf(_this, ClientConfigurationError.prototype);
96
+ return _this;
97
+ }
98
+ /**
99
+ * Creates an error thrown when the redirect uri is empty (not set by caller)
100
+ */
101
+ ClientConfigurationError.createRedirectUriEmptyError = function () {
102
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.redirectUriNotSet.code, ClientConfigurationErrorMessage.redirectUriNotSet.desc);
103
+ };
104
+ /**
105
+ * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)
106
+ */
107
+ ClientConfigurationError.createPostLogoutRedirectUriEmptyError = function () {
108
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.postLogoutUriNotSet.code, ClientConfigurationErrorMessage.postLogoutUriNotSet.desc);
109
+ };
110
+ /**
111
+ * Creates an error thrown when the claims request could not be successfully parsed
112
+ */
113
+ ClientConfigurationError.createClaimsRequestParsingError = function (claimsRequestParseError) {
114
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.claimsRequestParsingError.code, ClientConfigurationErrorMessage.claimsRequestParsingError.desc + " Given value: " + claimsRequestParseError);
115
+ };
116
+ /**
117
+ * Creates an error thrown if authority uri is given an insecure protocol.
118
+ * @param urlString
119
+ */
120
+ ClientConfigurationError.createInsecureAuthorityUriError = function (urlString) {
121
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.authorityUriInsecure.code, ClientConfigurationErrorMessage.authorityUriInsecure.desc + " Given URI: " + urlString);
122
+ };
123
+ /**
124
+ * Creates an error thrown if URL string does not parse into separate segments.
125
+ * @param urlString
126
+ */
127
+ ClientConfigurationError.createUrlParseError = function (urlParseError) {
128
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.urlParseError.code, ClientConfigurationErrorMessage.urlParseError.desc + " Given Error: " + urlParseError);
129
+ };
130
+ /**
131
+ * Creates an error thrown if URL string is empty or null.
132
+ * @param urlString
133
+ */
134
+ ClientConfigurationError.createUrlEmptyError = function () {
135
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.urlEmptyError.code, ClientConfigurationErrorMessage.urlEmptyError.desc);
136
+ };
137
+ /**
138
+ * Error thrown when scopes are empty.
139
+ * @param scopesValue
140
+ */
141
+ ClientConfigurationError.createEmptyScopesArrayError = function () {
142
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.emptyScopesError.code, "" + ClientConfigurationErrorMessage.emptyScopesError.desc);
143
+ };
144
+ /**
145
+ * Error thrown when client id scope is not provided as single scope.
146
+ * @param inputScopes
147
+ */
148
+ ClientConfigurationError.createClientIdSingleScopeError = function (inputScopes) {
149
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.clientIdSingleScopeError.code, ClientConfigurationErrorMessage.clientIdSingleScopeError.desc + " Given Scopes: " + inputScopes);
150
+ };
151
+ /**
152
+ * Error thrown when prompt is not an allowed type.
153
+ * @param promptValue
154
+ */
155
+ ClientConfigurationError.createInvalidPromptError = function (promptValue) {
156
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidPrompt.code, ClientConfigurationErrorMessage.invalidPrompt.desc + " Given value: " + promptValue);
157
+ };
158
+ /**
159
+ * Creates error thrown when claims parameter is not a stringified JSON object
160
+ */
161
+ ClientConfigurationError.createInvalidClaimsRequestError = function () {
162
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidClaimsRequest.code, ClientConfigurationErrorMessage.invalidClaimsRequest.desc);
163
+ };
164
+ /**
165
+ * Throws error when token request is empty and nothing cached in storage.
166
+ */
167
+ ClientConfigurationError.createEmptyLogoutRequestError = function () {
168
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.logoutRequestEmptyError.code, ClientConfigurationErrorMessage.logoutRequestEmptyError.desc);
169
+ };
170
+ /**
171
+ * Throws error when token request is empty and nothing cached in storage.
172
+ */
173
+ ClientConfigurationError.createEmptyTokenRequestError = function () {
174
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.tokenRequestEmptyError.code, ClientConfigurationErrorMessage.tokenRequestEmptyError.desc);
175
+ };
176
+ /**
177
+ * Throws error when an invalid code_challenge_method is passed by the user
178
+ */
179
+ ClientConfigurationError.createInvalidCodeChallengeMethodError = function () {
180
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidCodeChallengeMethod.code, ClientConfigurationErrorMessage.invalidCodeChallengeMethod.desc);
181
+ };
182
+ /**
183
+ * Throws error when both params: code_challenge and code_challenge_method are not passed together
184
+ */
185
+ ClientConfigurationError.createInvalidCodeChallengeParamsError = function () {
186
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidCodeChallengeParams.code, ClientConfigurationErrorMessage.invalidCodeChallengeParams.desc);
187
+ };
188
+ /**
189
+ * Throws an error when the user passes invalid cloudDiscoveryMetadata
190
+ */
191
+ ClientConfigurationError.createInvalidCloudDiscoveryMetadataError = function () {
192
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.code, ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.desc);
193
+ };
194
+ /**
195
+ * Throws an error when the user passes invalid cloudDiscoveryMetadata
196
+ */
197
+ ClientConfigurationError.createInvalidAuthorityMetadataError = function () {
198
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthorityMetadata.code, ClientConfigurationErrorMessage.invalidAuthorityMetadata.desc);
199
+ };
200
+ /**
201
+ * Throws error when provided authority is not a member of the trusted host list
202
+ */
203
+ ClientConfigurationError.createUntrustedAuthorityError = function () {
204
+ return new ClientConfigurationError(ClientConfigurationErrorMessage.untrustedAuthority.code, ClientConfigurationErrorMessage.untrustedAuthority.desc);
205
+ };
206
+ return ClientConfigurationError;
207
+ }(ClientAuthError));
208
+
209
+ export { ClientConfigurationError, ClientConfigurationErrorMessage };
210
+ //# sourceMappingURL=ClientConfigurationError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientConfigurationError.js","sources":["../../src/error/ClientConfigurationError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ClientAuthError } from \"./ClientAuthError\";\n\n/**\n * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.\n */\nexport const ClientConfigurationErrorMessage = {\n redirectUriNotSet: {\n code: \"redirect_uri_empty\",\n desc: \"A redirect URI is required for all calls, and none has been set.\"\n },\n postLogoutUriNotSet: {\n code: \"post_logout_uri_empty\",\n desc: \"A post logout redirect has not been set.\"\n },\n claimsRequestParsingError: {\n code: \"claims_request_parsing_error\",\n desc: \"Could not parse the given claims request object.\"\n },\n authorityUriInsecure: {\n code: \"authority_uri_insecure\",\n desc: \"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options\"\n },\n urlParseError: {\n code: \"url_parse_error\",\n desc: \"URL could not be parsed into appropriate segments.\"\n },\n urlEmptyError: {\n code: \"empty_url_error\",\n desc: \"URL was empty or null.\"\n },\n emptyScopesError: {\n code: \"empty_input_scopes_error\",\n desc: \"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.\"\n },\n nonArrayScopesError: {\n code: \"nonarray_input_scopes_error\",\n desc: \"Scopes cannot be passed as non-array.\"\n },\n clientIdSingleScopeError: {\n code: \"clientid_input_scopes_error\",\n desc: \"Client ID can only be provided as a single scope.\"\n },\n invalidPrompt: {\n code: \"invalid_prompt_value\",\n desc: \"Supported prompt values are 'login', 'select_account', 'consent', 'create' and 'none'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest\",\n },\n invalidClaimsRequest: {\n code: \"invalid_claims\",\n desc: \"Given claims parameter must be a stringified JSON object.\"\n },\n tokenRequestEmptyError: {\n code: \"token_request_empty\",\n desc: \"Token request was empty and not found in cache.\"\n },\n logoutRequestEmptyError: {\n code: \"logout_request_empty\",\n desc: \"The logout request was null or undefined.\"\n },\n invalidCodeChallengeMethod: {\n code: \"invalid_code_challenge_method\",\n desc: \"code_challenge_method passed is invalid. Valid values are \\\"plain\\\" and \\\"S256\\\".\"\n },\n invalidCodeChallengeParams: {\n code: \"pkce_params_missing\",\n desc: \"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request\"\n },\n invalidCloudDiscoveryMetadata: {\n code: \"invalid_cloud_discovery_metadata\",\n desc: \"Invalid cloudDiscoveryMetadata provided. Must be a JSON object containing tenant_discovery_endpoint and metadata fields\"\n },\n invalidAuthorityMetadata: {\n code: \"invalid_authority_metadata\",\n desc: \"Invalid authorityMetadata provided. Must by a JSON object containing authorization_endpoint, token_endpoint, end_session_endpoint, issuer fields.\"\n },\n untrustedAuthority: {\n code: \"untrusted_authority\",\n desc: \"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.\"\n }\n};\n\n/**\n * Error thrown when there is an error in configuration of the MSAL.js library.\n */\nexport class ClientConfigurationError extends ClientAuthError {\n\n constructor(errorCode: string, errorMessage?: string) {\n super(errorCode, errorMessage);\n this.name = \"ClientConfigurationError\";\n Object.setPrototypeOf(this, ClientConfigurationError.prototype);\n }\n\n /**\n * Creates an error thrown when the redirect uri is empty (not set by caller)\n */\n static createRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.redirectUriNotSet.code,\n ClientConfigurationErrorMessage.redirectUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the post-logout redirect uri is empty (not set by caller)\n */\n static createPostLogoutRedirectUriEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.postLogoutUriNotSet.code,\n ClientConfigurationErrorMessage.postLogoutUriNotSet.desc);\n }\n\n /**\n * Creates an error thrown when the claims request could not be successfully parsed\n */\n static createClaimsRequestParsingError(claimsRequestParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.claimsRequestParsingError.code,\n `${ClientConfigurationErrorMessage.claimsRequestParsingError.desc} Given value: ${claimsRequestParseError}`);\n }\n\n /**\n * Creates an error thrown if authority uri is given an insecure protocol.\n * @param urlString\n */\n static createInsecureAuthorityUriError(urlString: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.authorityUriInsecure.code,\n `${ClientConfigurationErrorMessage.authorityUriInsecure.desc} Given URI: ${urlString}`);\n }\n\n /**\n * Creates an error thrown if URL string does not parse into separate segments.\n * @param urlString\n */\n static createUrlParseError(urlParseError: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlParseError.code,\n `${ClientConfigurationErrorMessage.urlParseError.desc} Given Error: ${urlParseError}`);\n }\n\n /**\n * Creates an error thrown if URL string is empty or null.\n * @param urlString\n */\n static createUrlEmptyError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.urlEmptyError.code,\n ClientConfigurationErrorMessage.urlEmptyError.desc);\n }\n\n /**\n * Error thrown when scopes are empty.\n * @param scopesValue\n */\n static createEmptyScopesArrayError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.emptyScopesError.code,\n `${ClientConfigurationErrorMessage.emptyScopesError.desc}`);\n }\n\n /**\n * Error thrown when client id scope is not provided as single scope.\n * @param inputScopes\n */\n static createClientIdSingleScopeError(inputScopes: Array<string>): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.clientIdSingleScopeError.code,\n `${ClientConfigurationErrorMessage.clientIdSingleScopeError.desc} Given Scopes: ${inputScopes}`);\n }\n\n /**\n * Error thrown when prompt is not an allowed type.\n * @param promptValue\n */\n static createInvalidPromptError(promptValue: string): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidPrompt.code,\n `${ClientConfigurationErrorMessage.invalidPrompt.desc} Given value: ${promptValue}`);\n }\n\n /**\n * Creates error thrown when claims parameter is not a stringified JSON object\n */\n static createInvalidClaimsRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidClaimsRequest.code,\n ClientConfigurationErrorMessage.invalidClaimsRequest.desc);\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyLogoutRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.logoutRequestEmptyError.code,\n ClientConfigurationErrorMessage.logoutRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when token request is empty and nothing cached in storage.\n */\n static createEmptyTokenRequestError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.tokenRequestEmptyError.code,\n ClientConfigurationErrorMessage.tokenRequestEmptyError.desc\n );\n }\n\n /**\n * Throws error when an invalid code_challenge_method is passed by the user\n */\n static createInvalidCodeChallengeMethodError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeMethod.desc\n );\n }\n\n /**\n * Throws error when both params: code_challenge and code_challenge_method are not passed together\n */\n static createInvalidCodeChallengeParamsError(): ClientConfigurationError {\n return new ClientConfigurationError(\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.code,\n ClientConfigurationErrorMessage.invalidCodeChallengeParams.desc\n );\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidCloudDiscoveryMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.code,\n ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.desc);\n }\n\n /**\n * Throws an error when the user passes invalid cloudDiscoveryMetadata\n */\n static createInvalidAuthorityMetadataError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthorityMetadata.code,\n ClientConfigurationErrorMessage.invalidAuthorityMetadata.desc);\n }\n\n /**\n * Throws error when provided authority is not a member of the trusted host list\n */\n static createUntrustedAuthorityError(): ClientConfigurationError {\n return new ClientConfigurationError(ClientConfigurationErrorMessage.untrustedAuthority.code,\n ClientConfigurationErrorMessage.untrustedAuthority.desc);\n }\n}\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,48 @@
1
+ /*! @azure/msal-common v4.5.1 2021-08-02 */
2
+ 'use strict';
3
+ import { __extends } from '../_virtual/_tslib.js';
4
+ import { ServerError } from './ServerError.js';
5
+
6
+ /*
7
+ * Copyright (c) Microsoft Corporation. All rights reserved.
8
+ * Licensed under the MIT License.
9
+ */
10
+ /**
11
+ * InteractionRequiredAuthErrorMessage class containing string constants used by error codes and messages.
12
+ */
13
+ var InteractionRequiredAuthErrorMessage = [
14
+ "interaction_required",
15
+ "consent_required",
16
+ "login_required"
17
+ ];
18
+ var InteractionRequiredAuthSubErrorMessage = [
19
+ "message_only",
20
+ "additional_action",
21
+ "basic_action",
22
+ "user_password_expired",
23
+ "consent_required"
24
+ ];
25
+ /**
26
+ * Error thrown when user interaction is required at the auth server.
27
+ */
28
+ var InteractionRequiredAuthError = /** @class */ (function (_super) {
29
+ __extends(InteractionRequiredAuthError, _super);
30
+ function InteractionRequiredAuthError(errorCode, errorMessage, subError) {
31
+ var _this = _super.call(this, errorCode, errorMessage, subError) || this;
32
+ _this.name = "InteractionRequiredAuthError";
33
+ Object.setPrototypeOf(_this, InteractionRequiredAuthError.prototype);
34
+ return _this;
35
+ }
36
+ InteractionRequiredAuthError.isInteractionRequiredError = function (errorCode, errorString, subError) {
37
+ var isInteractionRequiredErrorCode = !!errorCode && InteractionRequiredAuthErrorMessage.indexOf(errorCode) > -1;
38
+ var isInteractionRequiredSubError = !!subError && InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;
39
+ var isInteractionRequiredErrorDesc = !!errorString && InteractionRequiredAuthErrorMessage.some(function (irErrorCode) {
40
+ return errorString.indexOf(irErrorCode) > -1;
41
+ });
42
+ return isInteractionRequiredErrorCode || isInteractionRequiredErrorDesc || isInteractionRequiredSubError;
43
+ };
44
+ return InteractionRequiredAuthError;
45
+ }(ServerError));
46
+
47
+ export { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, InteractionRequiredAuthSubErrorMessage };
48
+ //# sourceMappingURL=InteractionRequiredAuthError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractionRequiredAuthError.js","sources":["../../src/error/InteractionRequiredAuthError.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ServerError } from \"./ServerError\";\n\n/**\n * InteractionRequiredAuthErrorMessage class containing string constants used by error codes and messages.\n */\nexport const InteractionRequiredAuthErrorMessage = [\n \"interaction_required\",\n \"consent_required\",\n \"login_required\"\n];\n\nexport const InteractionRequiredAuthSubErrorMessage = [\n \"message_only\",\n \"additional_action\",\n \"basic_action\",\n \"user_password_expired\",\n \"consent_required\"\n];\n\n/**\n * Error thrown when user interaction is required at the auth server.\n */\nexport class InteractionRequiredAuthError extends ServerError {\n\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\n super(errorCode, errorMessage, subError);\n this.name = \"InteractionRequiredAuthError\";\n\n Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);\n }\n\n static isInteractionRequiredError(errorCode?: string, errorString?: string, subError?: string) : boolean {\n const isInteractionRequiredErrorCode = !!errorCode && InteractionRequiredAuthErrorMessage.indexOf(errorCode) > -1;\n const isInteractionRequiredSubError = !!subError && InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;\n const isInteractionRequiredErrorDesc = !!errorString && InteractionRequiredAuthErrorMessage.some((irErrorCode) => {\n return errorString.indexOf(irErrorCode) > -1;\n });\n\n return isInteractionRequiredErrorCode || isInteractionRequiredErrorDesc || isInteractionRequiredSubError;\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAOA;;;IAGa,mCAAmC,GAAG;IAC/C,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;EAClB;IAEW,sCAAsC,GAAG;IAClD,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,uBAAuB;IACvB,kBAAkB;EACpB;AAEF;;;;IAGkD,gDAAW;IAEzD,sCAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB;QAAxE,YACI,kBAAM,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,SAI3C;QAHG,KAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAE3C,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;;KACvE;IAEM,uDAA0B,GAAjC,UAAkC,SAAkB,EAAE,WAAoB,EAAE,QAAiB;QACzF,IAAM,8BAA8B,GAAG,CAAC,CAAC,SAAS,IAAI,mCAAmC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QAClH,IAAM,6BAA6B,GAAG,CAAC,CAAC,QAAQ,IAAI,sCAAsC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAClH,IAAM,8BAA8B,GAAG,CAAC,CAAC,WAAW,IAAI,mCAAmC,CAAC,IAAI,CAAC,UAAC,WAAW;YACzG,OAAO,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;SAChD,CAAC,CAAC;QAEH,OAAO,8BAA8B,IAAI,8BAA8B,IAAI,6BAA6B,CAAC;KAC5G;IACL,mCAAC;AAAD,CAlBA,CAAkD,WAAW;;;;"}
@@ -0,0 +1,25 @@
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
+ * Error thrown when there is an error with the server code, for example, unavailability.
12
+ */
13
+ var ServerError = /** @class */ (function (_super) {
14
+ __extends(ServerError, _super);
15
+ function ServerError(errorCode, errorMessage, subError) {
16
+ var _this = _super.call(this, errorCode, errorMessage, subError) || this;
17
+ _this.name = "ServerError";
18
+ Object.setPrototypeOf(_this, ServerError.prototype);
19
+ return _this;
20
+ }
21
+ return ServerError;
22
+ }(AuthError));
23
+
24
+ export { ServerError };
25
+ //# sourceMappingURL=ServerError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerError.js","sources":["../../src/error/ServerError.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 * Error thrown when there is an error with the server code, for example, unavailability.\n */\nexport class ServerError extends AuthError {\n\n constructor(errorCode?: string, errorMessage?: string, subError?: string) {\n super(errorCode, errorMessage, subError);\n this.name = \"ServerError\";\n\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;AAOA;;;;IAGiC,+BAAS;IAEtC,qBAAY,SAAkB,EAAE,YAAqB,EAAE,QAAiB;QAAxE,YACI,kBAAM,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,SAI3C;QAHG,KAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAE1B,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;;KACtD;IACL,kBAAC;AAAD,CARA,CAAiC,SAAS;;;;"}