@azure/msal-common 14.0.0-alpha.1 → 14.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +62 -62
  3. package/dist/account/AccountInfo.d.ts +31 -31
  4. package/dist/account/AuthToken.d.ts +20 -20
  5. package/dist/account/AuthToken.js +48 -48
  6. package/dist/account/CcsCredential.d.ts +9 -8
  7. package/dist/account/CcsCredential.d.ts.map +1 -1
  8. package/dist/account/CcsCredential.js +9 -10
  9. package/dist/account/CcsCredential.js.map +1 -1
  10. package/dist/account/ClientCredentials.d.ts +14 -14
  11. package/dist/account/ClientInfo.d.ts +19 -19
  12. package/dist/account/ClientInfo.js +37 -37
  13. package/dist/account/DecodedAuthToken.d.ts +8 -8
  14. package/dist/account/TokenClaims.d.ts +65 -65
  15. package/dist/authority/Authority.d.ts +228 -215
  16. package/dist/authority/Authority.d.ts.map +1 -1
  17. package/dist/authority/Authority.js +716 -682
  18. package/dist/authority/Authority.js.map +1 -1
  19. package/dist/authority/AuthorityFactory.d.ts +30 -30
  20. package/dist/authority/AuthorityFactory.js +47 -47
  21. package/dist/authority/AuthorityMetadata.d.ts +622 -622
  22. package/dist/authority/AuthorityMetadata.js +876 -876
  23. package/dist/authority/AuthorityOptions.d.ts +19 -18
  24. package/dist/authority/AuthorityOptions.d.ts.map +1 -1
  25. package/dist/authority/AuthorityOptions.js +19 -20
  26. package/dist/authority/AuthorityOptions.js.map +1 -1
  27. package/dist/authority/AuthorityType.d.ts +10 -9
  28. package/dist/authority/AuthorityType.d.ts.map +1 -1
  29. package/dist/authority/AuthorityType.js +14 -15
  30. package/dist/authority/AuthorityType.js.map +1 -1
  31. package/dist/authority/AzureRegion.d.ts +1 -1
  32. package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
  33. package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
  34. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
  35. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +8 -8
  36. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
  37. package/dist/authority/CloudInstanceDiscoveryResponse.js +8 -8
  38. package/dist/authority/ImdsOptions.d.ts +5 -5
  39. package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
  40. package/dist/authority/OpenIdConfigResponse.js +10 -10
  41. package/dist/authority/ProtocolMode.d.ts +8 -7
  42. package/dist/authority/ProtocolMode.d.ts.map +1 -1
  43. package/dist/authority/ProtocolMode.js +12 -13
  44. package/dist/authority/ProtocolMode.js.map +1 -1
  45. package/dist/authority/RegionDiscovery.d.ts +30 -30
  46. package/dist/authority/RegionDiscovery.js +108 -108
  47. package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
  48. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
  49. package/dist/cache/CacheManager.d.ts +443 -443
  50. package/dist/cache/CacheManager.js +1011 -1011
  51. package/dist/cache/entities/AccessTokenEntity.d.ts +56 -56
  52. package/dist/cache/entities/AccessTokenEntity.js +111 -111
  53. package/dist/cache/entities/AccountEntity.d.ts +99 -99
  54. package/dist/cache/entities/AccountEntity.js +248 -248
  55. package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
  56. package/dist/cache/entities/AppMetadataEntity.js +66 -66
  57. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +47 -47
  58. package/dist/cache/entities/AuthorityMetadataEntity.js +77 -77
  59. package/dist/cache/entities/CacheRecord.d.ts +13 -13
  60. package/dist/cache/entities/CacheRecord.js +13 -13
  61. package/dist/cache/entities/CredentialEntity.d.ts +88 -88
  62. package/dist/cache/entities/CredentialEntity.js +136 -136
  63. package/dist/cache/entities/IdTokenEntity.d.ts +34 -34
  64. package/dist/cache/entities/IdTokenEntity.js +56 -56
  65. package/dist/cache/entities/RefreshTokenEntity.d.ts +36 -36
  66. package/dist/cache/entities/RefreshTokenEntity.js +59 -59
  67. package/dist/cache/entities/ServerTelemetryEntity.d.ts +12 -12
  68. package/dist/cache/entities/ServerTelemetryEntity.js +27 -27
  69. package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
  70. package/dist/cache/entities/ThrottlingEntity.js +23 -23
  71. package/dist/cache/interface/ICacheManager.d.ts +165 -165
  72. package/dist/cache/interface/ICachePlugin.d.ts +5 -5
  73. package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
  74. package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
  75. package/dist/cache/persistence/TokenCacheContext.js +25 -25
  76. package/dist/cache/utils/CacheTypes.d.ts +62 -62
  77. package/dist/client/AuthorizationCodeClient.d.ts +71 -71
  78. package/dist/client/AuthorizationCodeClient.js +433 -433
  79. package/dist/client/BaseClient.d.ts +50 -50
  80. package/dist/client/BaseClient.js +92 -92
  81. package/dist/client/RefreshTokenClient.d.ts +34 -34
  82. package/dist/client/RefreshTokenClient.js +239 -239
  83. package/dist/client/SilentFlowClient.d.ts +24 -24
  84. package/dist/client/SilentFlowClient.js +94 -94
  85. package/dist/config/AppTokenProvider.d.ts +38 -38
  86. package/dist/config/ClientConfiguration.d.ts +133 -133
  87. package/dist/config/ClientConfiguration.js +88 -88
  88. package/dist/crypto/ICrypto.d.ts +62 -62
  89. package/dist/crypto/ICrypto.js +42 -42
  90. package/dist/crypto/IGuidGenerator.d.ts +4 -4
  91. package/dist/crypto/JoseHeader.d.ts +21 -21
  92. package/dist/crypto/JoseHeader.js +36 -36
  93. package/dist/crypto/PopTokenGenerator.d.ts +58 -57
  94. package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
  95. package/dist/crypto/PopTokenGenerator.js +82 -83
  96. package/dist/crypto/PopTokenGenerator.js.map +1 -1
  97. package/dist/crypto/SignedHttpRequest.d.ts +11 -11
  98. package/dist/error/AuthError.d.ts +47 -47
  99. package/dist/error/AuthError.js +51 -51
  100. package/dist/error/ClientAuthError.d.ts +412 -412
  101. package/dist/error/ClientAuthError.js +519 -519
  102. package/dist/error/ClientConfigurationError.d.ts +206 -198
  103. package/dist/error/ClientConfigurationError.d.ts.map +1 -1
  104. package/dist/error/ClientConfigurationError.js +259 -249
  105. package/dist/error/ClientConfigurationError.js.map +1 -1
  106. package/dist/error/InteractionRequiredAuthError.d.ts +59 -59
  107. package/dist/error/InteractionRequiredAuthError.js +78 -78
  108. package/dist/error/JoseHeaderError.d.ts +28 -28
  109. package/dist/error/JoseHeaderError.js +39 -39
  110. package/dist/error/ServerError.d.ts +7 -7
  111. package/dist/error/ServerError.js +14 -14
  112. package/dist/index.cjs.js +8826 -8813
  113. package/dist/index.cjs.js.map +1 -1
  114. package/dist/index.d.ts +93 -93
  115. package/dist/index.js +1 -1
  116. package/dist/logger/Logger.d.ts +95 -95
  117. package/dist/logger/Logger.js +197 -197
  118. package/dist/network/INetworkModule.d.ts +29 -29
  119. package/dist/network/INetworkModule.js +14 -14
  120. package/dist/network/NetworkManager.d.ts +32 -32
  121. package/dist/network/NetworkManager.js +33 -33
  122. package/dist/network/RequestThumbprint.d.ts +16 -16
  123. package/dist/network/ThrottlingUtils.d.ts +41 -41
  124. package/dist/network/ThrottlingUtils.js +94 -94
  125. package/dist/packageMetadata.d.ts +2 -2
  126. package/dist/packageMetadata.d.ts.map +1 -1
  127. package/dist/packageMetadata.js +4 -4
  128. package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
  129. package/dist/request/AuthenticationHeaderParser.js +55 -55
  130. package/dist/request/BaseAuthRequest.d.ts +37 -37
  131. package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
  132. package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
  133. package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
  134. package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
  135. package/dist/request/CommonEndSessionRequest.d.ts +21 -21
  136. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
  137. package/dist/request/CommonRefreshTokenRequest.d.ts +19 -19
  138. package/dist/request/CommonSilentFlowRequest.d.ts +18 -18
  139. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
  140. package/dist/request/NativeRequest.d.ts +19 -19
  141. package/dist/request/NativeSignOutRequest.d.ts +5 -5
  142. package/dist/request/RequestParameterBuilder.d.ts +216 -216
  143. package/dist/request/RequestParameterBuilder.js +374 -374
  144. package/dist/request/RequestValidator.d.ts +33 -33
  145. package/dist/request/RequestValidator.js +82 -83
  146. package/dist/request/RequestValidator.js.map +1 -1
  147. package/dist/request/ScopeSet.d.ts +88 -88
  148. package/dist/request/ScopeSet.js +197 -197
  149. package/dist/response/AuthenticationResult.d.ts +39 -39
  150. package/dist/response/AuthorizationCodePayload.d.ts +13 -13
  151. package/dist/response/DeviceCodeResponse.d.ts +25 -25
  152. package/dist/response/ExternalTokenResponse.d.ts +15 -15
  153. package/dist/response/IMDSBadResponse.d.ts +4 -4
  154. package/dist/response/ResponseHandler.d.ts +72 -72
  155. package/dist/response/ResponseHandler.js +300 -300
  156. package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
  157. package/dist/response/ServerAuthorizationTokenResponse.d.ts +44 -44
  158. package/dist/telemetry/performance/IPerformanceClient.d.ts +42 -42
  159. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
  160. package/dist/telemetry/performance/PerformanceClient.d.ts +189 -189
  161. package/dist/telemetry/performance/PerformanceClient.js +406 -406
  162. package/dist/telemetry/performance/PerformanceEvent.d.ts +441 -439
  163. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  164. package/dist/telemetry/performance/PerformanceEvent.js +225 -227
  165. package/dist/telemetry/performance/PerformanceEvent.js.map +1 -1
  166. package/dist/telemetry/performance/StubPerformanceClient.d.ts +15 -19
  167. package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
  168. package/dist/telemetry/performance/StubPerformanceClient.js +22 -36
  169. package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -1
  170. package/dist/telemetry/server/ServerTelemetryManager.d.ts +65 -65
  171. package/dist/telemetry/server/ServerTelemetryManager.js +196 -196
  172. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
  173. package/dist/url/IUri.d.ts +12 -12
  174. package/dist/url/UrlString.d.ts +70 -70
  175. package/dist/url/UrlString.js +242 -242
  176. package/dist/utils/Constants.d.ts +345 -331
  177. package/dist/utils/Constants.d.ts.map +1 -1
  178. package/dist/utils/Constants.js +353 -373
  179. package/dist/utils/Constants.js.map +1 -1
  180. package/dist/utils/MsalTypes.d.ts +6 -6
  181. package/dist/utils/ProtocolUtils.d.ts +42 -42
  182. package/dist/utils/ProtocolUtils.js +71 -71
  183. package/dist/utils/StringUtils.d.ts +53 -53
  184. package/dist/utils/StringUtils.js +124 -124
  185. package/dist/utils/TimeUtils.d.ts +27 -27
  186. package/dist/utils/TimeUtils.js +45 -45
  187. package/package.json +86 -79
@@ -1,377 +1,357 @@
1
- /*! @azure/msal-common v14.0.0-alpha.1 2023-05-08 */
1
+ /*! @azure/msal-common v14.0.0-beta.0 2023-06-19 */
2
2
  'use strict';
3
- /*
4
- * Copyright (c) Microsoft Corporation. All rights reserved.
5
- * Licensed under the MIT License.
6
- */
7
- const Constants = {
8
- LIBRARY_NAME: "MSAL.JS",
9
- SKU: "msal.js.common",
10
- // Prefix for all library cache entries
11
- CACHE_PREFIX: "msal",
12
- // default authority
13
- DEFAULT_AUTHORITY: "https://login.microsoftonline.com/common/",
14
- DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com",
15
- DEFAULT_COMMON_TENANT: "common",
16
- // ADFS String
17
- ADFS: "adfs",
18
- DSTS: "dstsv2",
19
- // Default AAD Instance Discovery Endpoint
20
- AAD_INSTANCE_DISCOVERY_ENDPT: "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",
21
- // CIAM URL
22
- CIAM_AUTH_URL: ".ciamlogin.com",
23
- AAD_TENANT_DOMAIN_SUFFIX: ".onmicrosoft.com",
24
- // Resource delimiter - used for certain cache entries
25
- RESOURCE_DELIM: "|",
26
- // Placeholder for non-existent account ids/objects
27
- NO_ACCOUNT: "NO_ACCOUNT",
28
- // Claims
29
- CLAIMS: "claims",
30
- // Consumer UTID
31
- CONSUMER_UTID: "9188040d-6c67-4c5b-b112-36a304b66dad",
32
- // Default scopes
33
- OPENID_SCOPE: "openid",
34
- PROFILE_SCOPE: "profile",
35
- OFFLINE_ACCESS_SCOPE: "offline_access",
36
- EMAIL_SCOPE: "email",
37
- // Default response type for authorization code flow
38
- CODE_RESPONSE_TYPE: "code",
39
- CODE_GRANT_TYPE: "authorization_code",
40
- RT_GRANT_TYPE: "refresh_token",
41
- FRAGMENT_RESPONSE_MODE: "fragment",
42
- S256_CODE_CHALLENGE_METHOD: "S256",
43
- URL_FORM_CONTENT_TYPE: "application/x-www-form-urlencoded;charset=utf-8",
44
- AUTHORIZATION_PENDING: "authorization_pending",
45
- NOT_DEFINED: "not_defined",
46
- EMPTY_STRING: "",
47
- NOT_APPLICABLE: "N/A",
48
- FORWARD_SLASH: "/",
49
- IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location",
50
- IMDS_VERSION: "2020-06-01",
51
- IMDS_TIMEOUT: 2000,
52
- AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect",
53
- REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com",
54
- REGIONAL_AUTH_NON_MSI_QUERY_STRING: "allowestsrnonmsi=true",
55
- KNOWN_PUBLIC_CLOUDS: [
56
- "login.microsoftonline.com",
57
- "login.windows.net",
58
- "login.microsoft.com",
59
- "sts.windows.net",
60
- ],
61
- TOKEN_RESPONSE_TYPE: "token",
62
- ID_TOKEN_RESPONSE_TYPE: "id_token",
63
- SHR_NONCE_VALIDITY: 240,
64
- INVALID_INSTANCE: "invalid_instance",
65
- };
66
- const OIDC_DEFAULT_SCOPES = [
67
- Constants.OPENID_SCOPE,
68
- Constants.PROFILE_SCOPE,
69
- Constants.OFFLINE_ACCESS_SCOPE,
70
- ];
71
- const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE];
72
- /**
73
- * Request header names
74
- */
75
- var HeaderNames;
76
- (function (HeaderNames) {
77
- HeaderNames["CONTENT_TYPE"] = "Content-Type";
78
- HeaderNames["RETRY_AFTER"] = "Retry-After";
79
- HeaderNames["CCS_HEADER"] = "X-AnchorMailbox";
80
- HeaderNames["WWWAuthenticate"] = "WWW-Authenticate";
81
- HeaderNames["AuthenticationInfo"] = "Authentication-Info";
82
- HeaderNames["X_MS_REQUEST_ID"] = "x-ms-request-id";
83
- HeaderNames["X_MS_HTTP_VERSION"] = "x-ms-httpver";
84
- })(HeaderNames || (HeaderNames = {}));
85
- /**
86
- * Persistent cache keys MSAL which stay while user is logged in.
87
- */
88
- var PersistentCacheKeys;
89
- (function (PersistentCacheKeys) {
90
- PersistentCacheKeys["ID_TOKEN"] = "idtoken";
91
- PersistentCacheKeys["CLIENT_INFO"] = "client.info";
92
- PersistentCacheKeys["ADAL_ID_TOKEN"] = "adal.idtoken";
93
- PersistentCacheKeys["ERROR"] = "error";
94
- PersistentCacheKeys["ERROR_DESC"] = "error.description";
95
- PersistentCacheKeys["ACTIVE_ACCOUNT"] = "active-account";
96
- PersistentCacheKeys["ACTIVE_ACCOUNT_FILTERS"] = "active-account-filters";
97
- })(PersistentCacheKeys || (PersistentCacheKeys = {}));
98
- /**
99
- * String constants related to AAD Authority
100
- */
101
- var AADAuthorityConstants;
102
- (function (AADAuthorityConstants) {
103
- AADAuthorityConstants["COMMON"] = "common";
104
- AADAuthorityConstants["ORGANIZATIONS"] = "organizations";
105
- AADAuthorityConstants["CONSUMERS"] = "consumers";
106
- })(AADAuthorityConstants || (AADAuthorityConstants = {}));
107
- /**
108
- * Keys in the hashParams sent by AAD Server
109
- */
110
- var AADServerParamKeys;
111
- (function (AADServerParamKeys) {
112
- AADServerParamKeys["CLIENT_ID"] = "client_id";
113
- AADServerParamKeys["REDIRECT_URI"] = "redirect_uri";
114
- AADServerParamKeys["RESPONSE_TYPE"] = "response_type";
115
- AADServerParamKeys["RESPONSE_MODE"] = "response_mode";
116
- AADServerParamKeys["GRANT_TYPE"] = "grant_type";
117
- AADServerParamKeys["CLAIMS"] = "claims";
118
- AADServerParamKeys["SCOPE"] = "scope";
119
- AADServerParamKeys["ERROR"] = "error";
120
- AADServerParamKeys["ERROR_DESCRIPTION"] = "error_description";
121
- AADServerParamKeys["ACCESS_TOKEN"] = "access_token";
122
- AADServerParamKeys["ID_TOKEN"] = "id_token";
123
- AADServerParamKeys["REFRESH_TOKEN"] = "refresh_token";
124
- AADServerParamKeys["EXPIRES_IN"] = "expires_in";
125
- AADServerParamKeys["STATE"] = "state";
126
- AADServerParamKeys["NONCE"] = "nonce";
127
- AADServerParamKeys["PROMPT"] = "prompt";
128
- AADServerParamKeys["SESSION_STATE"] = "session_state";
129
- AADServerParamKeys["CLIENT_INFO"] = "client_info";
130
- AADServerParamKeys["CODE"] = "code";
131
- AADServerParamKeys["CODE_CHALLENGE"] = "code_challenge";
132
- AADServerParamKeys["CODE_CHALLENGE_METHOD"] = "code_challenge_method";
133
- AADServerParamKeys["CODE_VERIFIER"] = "code_verifier";
134
- AADServerParamKeys["CLIENT_REQUEST_ID"] = "client-request-id";
135
- AADServerParamKeys["X_CLIENT_SKU"] = "x-client-SKU";
136
- AADServerParamKeys["X_CLIENT_VER"] = "x-client-VER";
137
- AADServerParamKeys["X_CLIENT_OS"] = "x-client-OS";
138
- AADServerParamKeys["X_CLIENT_CPU"] = "x-client-CPU";
139
- AADServerParamKeys["X_CLIENT_CURR_TELEM"] = "x-client-current-telemetry";
140
- AADServerParamKeys["X_CLIENT_LAST_TELEM"] = "x-client-last-telemetry";
141
- AADServerParamKeys["X_MS_LIB_CAPABILITY"] = "x-ms-lib-capability";
142
- AADServerParamKeys["X_APP_NAME"] = "x-app-name";
143
- AADServerParamKeys["X_APP_VER"] = "x-app-ver";
144
- AADServerParamKeys["POST_LOGOUT_URI"] = "post_logout_redirect_uri";
145
- AADServerParamKeys["ID_TOKEN_HINT"] = "id_token_hint";
146
- AADServerParamKeys["DEVICE_CODE"] = "device_code";
147
- AADServerParamKeys["CLIENT_SECRET"] = "client_secret";
148
- AADServerParamKeys["CLIENT_ASSERTION"] = "client_assertion";
149
- AADServerParamKeys["CLIENT_ASSERTION_TYPE"] = "client_assertion_type";
150
- AADServerParamKeys["TOKEN_TYPE"] = "token_type";
151
- AADServerParamKeys["REQ_CNF"] = "req_cnf";
152
- AADServerParamKeys["OBO_ASSERTION"] = "assertion";
153
- AADServerParamKeys["REQUESTED_TOKEN_USE"] = "requested_token_use";
154
- AADServerParamKeys["ON_BEHALF_OF"] = "on_behalf_of";
155
- AADServerParamKeys["FOCI"] = "foci";
156
- AADServerParamKeys["CCS_HEADER"] = "X-AnchorMailbox";
157
- AADServerParamKeys["RETURN_SPA_CODE"] = "return_spa_code";
158
- AADServerParamKeys["NATIVE_BROKER"] = "nativebroker";
159
- AADServerParamKeys["LOGOUT_HINT"] = "logout_hint";
160
- })(AADServerParamKeys || (AADServerParamKeys = {}));
161
- /**
162
- * Claims request keys
163
- */
164
- var ClaimsRequestKeys;
165
- (function (ClaimsRequestKeys) {
166
- ClaimsRequestKeys["ACCESS_TOKEN"] = "access_token";
167
- ClaimsRequestKeys["XMS_CC"] = "xms_cc";
168
- })(ClaimsRequestKeys || (ClaimsRequestKeys = {}));
169
- /**
170
- * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
171
- * prompt values kept changing over past couple of years. There are some undocumented prompt values for some
172
- * internal partners too, hence the choice of generic "string" type instead of the "enum"
173
- */
174
- const PromptValue = {
175
- LOGIN: "login",
176
- SELECT_ACCOUNT: "select_account",
177
- CONSENT: "consent",
178
- NONE: "none",
179
- CREATE: "create",
180
- NO_SESSION: "no_session",
181
- };
182
- /**
183
- * SSO Types - generated to populate hints
184
- */
185
- var SSOTypes;
186
- (function (SSOTypes) {
187
- SSOTypes["ACCOUNT"] = "account";
188
- SSOTypes["SID"] = "sid";
189
- SSOTypes["LOGIN_HINT"] = "login_hint";
190
- SSOTypes["ID_TOKEN"] = "id_token";
191
- SSOTypes["DOMAIN_HINT"] = "domain_hint";
192
- SSOTypes["ORGANIZATIONS"] = "organizations";
193
- SSOTypes["CONSUMERS"] = "consumers";
194
- SSOTypes["ACCOUNT_ID"] = "accountIdentifier";
195
- SSOTypes["HOMEACCOUNT_ID"] = "homeAccountIdentifier";
196
- })(SSOTypes || (SSOTypes = {}));
197
- /**
198
- * allowed values for codeVerifier
199
- */
200
- const CodeChallengeMethodValues = {
201
- PLAIN: "plain",
202
- S256: "S256",
203
- };
204
- /**
205
- * allowed values for response_mode
206
- */
207
- var ResponseMode;
208
- (function (ResponseMode) {
209
- ResponseMode["QUERY"] = "query";
210
- ResponseMode["FRAGMENT"] = "fragment";
211
- ResponseMode["FORM_POST"] = "form_post";
212
- })(ResponseMode || (ResponseMode = {}));
213
- /**
214
- * allowed grant_type
215
- */
216
- var GrantType;
217
- (function (GrantType) {
218
- GrantType["IMPLICIT_GRANT"] = "implicit";
219
- GrantType["AUTHORIZATION_CODE_GRANT"] = "authorization_code";
220
- GrantType["CLIENT_CREDENTIALS_GRANT"] = "client_credentials";
221
- GrantType["RESOURCE_OWNER_PASSWORD_GRANT"] = "password";
222
- GrantType["REFRESH_TOKEN_GRANT"] = "refresh_token";
223
- GrantType["DEVICE_CODE_GRANT"] = "device_code";
224
- GrantType["JWT_BEARER"] = "urn:ietf:params:oauth:grant-type:jwt-bearer";
225
- })(GrantType || (GrantType = {}));
226
- /**
227
- * Account types in Cache
228
- */
229
- var CacheAccountType;
230
- (function (CacheAccountType) {
231
- CacheAccountType["MSSTS_ACCOUNT_TYPE"] = "MSSTS";
232
- CacheAccountType["ADFS_ACCOUNT_TYPE"] = "ADFS";
233
- CacheAccountType["MSAV1_ACCOUNT_TYPE"] = "MSA";
234
- CacheAccountType["GENERIC_ACCOUNT_TYPE"] = "Generic";
235
- })(CacheAccountType || (CacheAccountType = {}));
236
- /**
237
- * Separators used in cache
238
- */
239
- var Separators;
240
- (function (Separators) {
241
- Separators["CACHE_KEY_SEPARATOR"] = "-";
242
- Separators["CLIENT_INFO_SEPARATOR"] = ".";
243
- })(Separators || (Separators = {}));
244
- /**
245
- * Credential Type stored in the cache
246
- */
247
- var CredentialType;
248
- (function (CredentialType) {
249
- CredentialType["ID_TOKEN"] = "IdToken";
250
- CredentialType["ACCESS_TOKEN"] = "AccessToken";
251
- CredentialType["ACCESS_TOKEN_WITH_AUTH_SCHEME"] = "AccessToken_With_AuthScheme";
252
- CredentialType["REFRESH_TOKEN"] = "RefreshToken";
253
- })(CredentialType || (CredentialType = {}));
254
- /**
255
- * Combine all cache types
256
- */
257
- var CacheType;
258
- (function (CacheType) {
259
- CacheType[CacheType["ADFS"] = 1001] = "ADFS";
260
- CacheType[CacheType["MSA"] = 1002] = "MSA";
261
- CacheType[CacheType["MSSTS"] = 1003] = "MSSTS";
262
- CacheType[CacheType["GENERIC"] = 1004] = "GENERIC";
263
- CacheType[CacheType["ACCESS_TOKEN"] = 2001] = "ACCESS_TOKEN";
264
- CacheType[CacheType["REFRESH_TOKEN"] = 2002] = "REFRESH_TOKEN";
265
- CacheType[CacheType["ID_TOKEN"] = 2003] = "ID_TOKEN";
266
- CacheType[CacheType["APP_METADATA"] = 3001] = "APP_METADATA";
267
- CacheType[CacheType["UNDEFINED"] = 9999] = "UNDEFINED";
268
- })(CacheType || (CacheType = {}));
269
- /**
270
- * More Cache related constants
271
- */
272
- const APP_METADATA = "appmetadata";
273
- const CLIENT_INFO = "client_info";
274
- const THE_FAMILY_ID = "1";
275
- const AUTHORITY_METADATA_CONSTANTS = {
276
- CACHE_KEY: "authority-metadata",
277
- REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours
278
- };
279
- var AuthorityMetadataSource;
280
- (function (AuthorityMetadataSource) {
281
- AuthorityMetadataSource["CONFIG"] = "config";
282
- AuthorityMetadataSource["CACHE"] = "cache";
283
- AuthorityMetadataSource["NETWORK"] = "network";
284
- AuthorityMetadataSource["HARDCODED_VALUES"] = "hardcoded_values";
285
- })(AuthorityMetadataSource || (AuthorityMetadataSource = {}));
286
- const SERVER_TELEM_CONSTANTS = {
287
- SCHEMA_VERSION: 5,
288
- MAX_CUR_HEADER_BYTES: 80,
289
- MAX_LAST_HEADER_BYTES: 330,
290
- MAX_CACHED_ERRORS: 50,
291
- CACHE_KEY: "server-telemetry",
292
- CATEGORY_SEPARATOR: "|",
293
- VALUE_SEPARATOR: ",",
294
- OVERFLOW_TRUE: "1",
295
- OVERFLOW_FALSE: "0",
296
- UNKNOWN_ERROR: "unknown_error",
297
- };
298
- /**
299
- * Type of the authentication request
300
- */
301
- var AuthenticationScheme;
302
- (function (AuthenticationScheme) {
303
- AuthenticationScheme["BEARER"] = "Bearer";
304
- AuthenticationScheme["POP"] = "pop";
305
- AuthenticationScheme["SSH"] = "ssh-cert";
306
- })(AuthenticationScheme || (AuthenticationScheme = {}));
307
- /**
308
- * Constants related to throttling
309
- */
310
- const ThrottlingConstants = {
311
- // Default time to throttle RequestThumbprint in seconds
312
- DEFAULT_THROTTLE_TIME_SECONDS: 60,
313
- // Default maximum time to throttle in seconds, overrides what the server sends back
314
- DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600,
315
- // Prefix for storing throttling entries
316
- THROTTLING_PREFIX: "throttling",
317
- // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling
318
- X_MS_LIB_CAPABILITY_VALUE: "retry-after, h429",
319
- };
320
- const Errors = {
321
- INVALID_GRANT_ERROR: "invalid_grant",
322
- CLIENT_MISMATCH_ERROR: "client_mismatch",
323
- };
324
- /**
325
- * Password grant parameters
326
- */
327
- var PasswordGrantConstants;
328
- (function (PasswordGrantConstants) {
329
- PasswordGrantConstants["username"] = "username";
330
- PasswordGrantConstants["password"] = "password";
331
- })(PasswordGrantConstants || (PasswordGrantConstants = {}));
332
- /**
333
- * Response codes
334
- */
335
- var ResponseCodes;
336
- (function (ResponseCodes) {
337
- ResponseCodes[ResponseCodes["httpSuccess"] = 200] = "httpSuccess";
338
- ResponseCodes[ResponseCodes["httpBadRequest"] = 400] = "httpBadRequest";
339
- })(ResponseCodes || (ResponseCodes = {}));
340
- /**
341
- * Region Discovery Sources
342
- */
343
- var RegionDiscoverySources;
344
- (function (RegionDiscoverySources) {
345
- RegionDiscoverySources["FAILED_AUTO_DETECTION"] = "1";
346
- RegionDiscoverySources["INTERNAL_CACHE"] = "2";
347
- RegionDiscoverySources["ENVIRONMENT_VARIABLE"] = "3";
348
- RegionDiscoverySources["IMDS"] = "4";
349
- })(RegionDiscoverySources || (RegionDiscoverySources = {}));
350
- /**
351
- * Region Discovery Outcomes
352
- */
353
- var RegionDiscoveryOutcomes;
354
- (function (RegionDiscoveryOutcomes) {
355
- RegionDiscoveryOutcomes["CONFIGURED_MATCHES_DETECTED"] = "1";
356
- RegionDiscoveryOutcomes["CONFIGURED_NO_AUTO_DETECTION"] = "2";
357
- RegionDiscoveryOutcomes["CONFIGURED_NOT_DETECTED"] = "3";
358
- RegionDiscoveryOutcomes["AUTO_DETECTION_REQUESTED_SUCCESSFUL"] = "4";
359
- RegionDiscoveryOutcomes["AUTO_DETECTION_REQUESTED_FAILED"] = "5";
360
- })(RegionDiscoveryOutcomes || (RegionDiscoveryOutcomes = {}));
361
- var CacheOutcome;
362
- (function (CacheOutcome) {
363
- CacheOutcome["NO_CACHE_HIT"] = "0";
364
- CacheOutcome["FORCE_REFRESH"] = "1";
365
- CacheOutcome["NO_CACHED_ACCESS_TOKEN"] = "2";
366
- CacheOutcome["CACHED_ACCESS_TOKEN_EXPIRED"] = "3";
367
- CacheOutcome["REFRESH_CACHED_ACCESS_TOKEN"] = "4";
368
- })(CacheOutcome || (CacheOutcome = {}));
369
- var JsonTypes;
370
- (function (JsonTypes) {
371
- JsonTypes["Jwt"] = "JWT";
372
- JsonTypes["Jwk"] = "JWK";
373
- JsonTypes["Pop"] = "pop";
374
- })(JsonTypes || (JsonTypes = {}));
3
+ /*
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ * Licensed under the MIT License.
6
+ */
7
+ const Constants = {
8
+ LIBRARY_NAME: "MSAL.JS",
9
+ SKU: "msal.js.common",
10
+ // Prefix for all library cache entries
11
+ CACHE_PREFIX: "msal",
12
+ // default authority
13
+ DEFAULT_AUTHORITY: "https://login.microsoftonline.com/common/",
14
+ DEFAULT_AUTHORITY_HOST: "login.microsoftonline.com",
15
+ DEFAULT_COMMON_TENANT: "common",
16
+ // ADFS String
17
+ ADFS: "adfs",
18
+ DSTS: "dstsv2",
19
+ // Default AAD Instance Discovery Endpoint
20
+ AAD_INSTANCE_DISCOVERY_ENDPT: "https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",
21
+ // CIAM URL
22
+ CIAM_AUTH_URL: ".ciamlogin.com",
23
+ AAD_TENANT_DOMAIN_SUFFIX: ".onmicrosoft.com",
24
+ // Resource delimiter - used for certain cache entries
25
+ RESOURCE_DELIM: "|",
26
+ // Placeholder for non-existent account ids/objects
27
+ NO_ACCOUNT: "NO_ACCOUNT",
28
+ // Claims
29
+ CLAIMS: "claims",
30
+ // Consumer UTID
31
+ CONSUMER_UTID: "9188040d-6c67-4c5b-b112-36a304b66dad",
32
+ // Default scopes
33
+ OPENID_SCOPE: "openid",
34
+ PROFILE_SCOPE: "profile",
35
+ OFFLINE_ACCESS_SCOPE: "offline_access",
36
+ EMAIL_SCOPE: "email",
37
+ // Default response type for authorization code flow
38
+ CODE_RESPONSE_TYPE: "code",
39
+ CODE_GRANT_TYPE: "authorization_code",
40
+ RT_GRANT_TYPE: "refresh_token",
41
+ FRAGMENT_RESPONSE_MODE: "fragment",
42
+ S256_CODE_CHALLENGE_METHOD: "S256",
43
+ URL_FORM_CONTENT_TYPE: "application/x-www-form-urlencoded;charset=utf-8",
44
+ AUTHORIZATION_PENDING: "authorization_pending",
45
+ NOT_DEFINED: "not_defined",
46
+ EMPTY_STRING: "",
47
+ NOT_APPLICABLE: "N/A",
48
+ FORWARD_SLASH: "/",
49
+ IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location",
50
+ IMDS_VERSION: "2020-06-01",
51
+ IMDS_TIMEOUT: 2000,
52
+ AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect",
53
+ REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com",
54
+ REGIONAL_AUTH_NON_MSI_QUERY_STRING: "allowestsrnonmsi=true",
55
+ KNOWN_PUBLIC_CLOUDS: [
56
+ "login.microsoftonline.com",
57
+ "login.windows.net",
58
+ "login.microsoft.com",
59
+ "sts.windows.net",
60
+ ],
61
+ TOKEN_RESPONSE_TYPE: "token",
62
+ ID_TOKEN_RESPONSE_TYPE: "id_token",
63
+ SHR_NONCE_VALIDITY: 240,
64
+ INVALID_INSTANCE: "invalid_instance",
65
+ };
66
+ const OIDC_DEFAULT_SCOPES = [
67
+ Constants.OPENID_SCOPE,
68
+ Constants.PROFILE_SCOPE,
69
+ Constants.OFFLINE_ACCESS_SCOPE,
70
+ ];
71
+ const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE];
72
+ /**
73
+ * Request header names
74
+ */
75
+ const HeaderNames = {
76
+ CONTENT_TYPE: "Content-Type",
77
+ RETRY_AFTER: "Retry-After",
78
+ CCS_HEADER: "X-AnchorMailbox",
79
+ WWWAuthenticate: "WWW-Authenticate",
80
+ AuthenticationInfo: "Authentication-Info",
81
+ X_MS_REQUEST_ID: "x-ms-request-id",
82
+ X_MS_HTTP_VERSION: "x-ms-httpver",
83
+ };
84
+ /**
85
+ * Persistent cache keys MSAL which stay while user is logged in.
86
+ */
87
+ const PersistentCacheKeys = {
88
+ ID_TOKEN: "idtoken",
89
+ CLIENT_INFO: "client.info",
90
+ ADAL_ID_TOKEN: "adal.idtoken",
91
+ ERROR: "error",
92
+ ERROR_DESC: "error.description",
93
+ ACTIVE_ACCOUNT: "active-account",
94
+ ACTIVE_ACCOUNT_FILTERS: "active-account-filters", // new cache entry for active_account for a more robust version for browser
95
+ };
96
+ /**
97
+ * String constants related to AAD Authority
98
+ */
99
+ const AADAuthorityConstants = {
100
+ COMMON: "common",
101
+ ORGANIZATIONS: "organizations",
102
+ CONSUMERS: "consumers",
103
+ };
104
+ /**
105
+ * Keys in the hashParams sent by AAD Server
106
+ */
107
+ const AADServerParamKeys = {
108
+ CLIENT_ID: "client_id",
109
+ REDIRECT_URI: "redirect_uri",
110
+ RESPONSE_TYPE: "response_type",
111
+ RESPONSE_MODE: "response_mode",
112
+ GRANT_TYPE: "grant_type",
113
+ CLAIMS: "claims",
114
+ SCOPE: "scope",
115
+ ERROR: "error",
116
+ ERROR_DESCRIPTION: "error_description",
117
+ ACCESS_TOKEN: "access_token",
118
+ ID_TOKEN: "id_token",
119
+ REFRESH_TOKEN: "refresh_token",
120
+ EXPIRES_IN: "expires_in",
121
+ STATE: "state",
122
+ NONCE: "nonce",
123
+ PROMPT: "prompt",
124
+ SESSION_STATE: "session_state",
125
+ CLIENT_INFO: "client_info",
126
+ CODE: "code",
127
+ CODE_CHALLENGE: "code_challenge",
128
+ CODE_CHALLENGE_METHOD: "code_challenge_method",
129
+ CODE_VERIFIER: "code_verifier",
130
+ CLIENT_REQUEST_ID: "client-request-id",
131
+ X_CLIENT_SKU: "x-client-SKU",
132
+ X_CLIENT_VER: "x-client-VER",
133
+ X_CLIENT_OS: "x-client-OS",
134
+ X_CLIENT_CPU: "x-client-CPU",
135
+ X_CLIENT_CURR_TELEM: "x-client-current-telemetry",
136
+ X_CLIENT_LAST_TELEM: "x-client-last-telemetry",
137
+ X_MS_LIB_CAPABILITY: "x-ms-lib-capability",
138
+ X_APP_NAME: "x-app-name",
139
+ X_APP_VER: "x-app-ver",
140
+ POST_LOGOUT_URI: "post_logout_redirect_uri",
141
+ ID_TOKEN_HINT: "id_token_hint",
142
+ DEVICE_CODE: "device_code",
143
+ CLIENT_SECRET: "client_secret",
144
+ CLIENT_ASSERTION: "client_assertion",
145
+ CLIENT_ASSERTION_TYPE: "client_assertion_type",
146
+ TOKEN_TYPE: "token_type",
147
+ REQ_CNF: "req_cnf",
148
+ OBO_ASSERTION: "assertion",
149
+ REQUESTED_TOKEN_USE: "requested_token_use",
150
+ ON_BEHALF_OF: "on_behalf_of",
151
+ FOCI: "foci",
152
+ CCS_HEADER: "X-AnchorMailbox",
153
+ RETURN_SPA_CODE: "return_spa_code",
154
+ NATIVE_BROKER: "nativebroker",
155
+ LOGOUT_HINT: "logout_hint",
156
+ };
157
+ /**
158
+ * Claims request keys
159
+ */
160
+ const ClaimsRequestKeys = {
161
+ ACCESS_TOKEN: "access_token",
162
+ XMS_CC: "xms_cc",
163
+ };
164
+ /**
165
+ * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
166
+ * prompt values kept changing over past couple of years. There are some undocumented prompt values for some
167
+ * internal partners too, hence the choice of generic "string" type instead of the "enum"
168
+ */
169
+ const PromptValue = {
170
+ LOGIN: "login",
171
+ SELECT_ACCOUNT: "select_account",
172
+ CONSENT: "consent",
173
+ NONE: "none",
174
+ CREATE: "create",
175
+ NO_SESSION: "no_session",
176
+ };
177
+ /**
178
+ * SSO Types - generated to populate hints
179
+ */
180
+ const SSOTypes = {
181
+ ACCOUNT: "account",
182
+ SID: "sid",
183
+ LOGIN_HINT: "login_hint",
184
+ ID_TOKEN: "id_token",
185
+ DOMAIN_HINT: "domain_hint",
186
+ ORGANIZATIONS: "organizations",
187
+ CONSUMERS: "consumers",
188
+ ACCOUNT_ID: "accountIdentifier",
189
+ HOMEACCOUNT_ID: "homeAccountIdentifier",
190
+ };
191
+ /**
192
+ * allowed values for codeVerifier
193
+ */
194
+ const CodeChallengeMethodValues = {
195
+ PLAIN: "plain",
196
+ S256: "S256",
197
+ };
198
+ /**
199
+ * allowed values for response_mode
200
+ */
201
+ const ResponseMode = {
202
+ QUERY: "query",
203
+ FRAGMENT: "fragment",
204
+ FORM_POST: "form_post",
205
+ };
206
+ /**
207
+ * allowed grant_type
208
+ */
209
+ const GrantType = {
210
+ IMPLICIT_GRANT: "implicit",
211
+ AUTHORIZATION_CODE_GRANT: "authorization_code",
212
+ CLIENT_CREDENTIALS_GRANT: "client_credentials",
213
+ RESOURCE_OWNER_PASSWORD_GRANT: "password",
214
+ REFRESH_TOKEN_GRANT: "refresh_token",
215
+ DEVICE_CODE_GRANT: "device_code",
216
+ JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer",
217
+ };
218
+ /**
219
+ * Account types in Cache
220
+ */
221
+ const CacheAccountType = {
222
+ MSSTS_ACCOUNT_TYPE: "MSSTS",
223
+ ADFS_ACCOUNT_TYPE: "ADFS",
224
+ MSAV1_ACCOUNT_TYPE: "MSA",
225
+ GENERIC_ACCOUNT_TYPE: "Generic", // NTLM, Kerberos, FBA, Basic etc
226
+ };
227
+ /**
228
+ * Separators used in cache
229
+ */
230
+ const Separators = {
231
+ CACHE_KEY_SEPARATOR: "-",
232
+ CLIENT_INFO_SEPARATOR: ".",
233
+ };
234
+ /**
235
+ * Credential Type stored in the cache
236
+ */
237
+ const CredentialType = {
238
+ ID_TOKEN: "IdToken",
239
+ ACCESS_TOKEN: "AccessToken",
240
+ ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme",
241
+ REFRESH_TOKEN: "RefreshToken",
242
+ };
243
+ /**
244
+ * Combine all cache types
245
+ */
246
+ const CacheType = {
247
+ ADFS: 1001,
248
+ MSA: 1002,
249
+ MSSTS: 1003,
250
+ GENERIC: 1004,
251
+ ACCESS_TOKEN: 2001,
252
+ REFRESH_TOKEN: 2002,
253
+ ID_TOKEN: 2003,
254
+ APP_METADATA: 3001,
255
+ UNDEFINED: 9999,
256
+ };
257
+ /**
258
+ * More Cache related constants
259
+ */
260
+ const APP_METADATA = "appmetadata";
261
+ const CLIENT_INFO = "client_info";
262
+ const THE_FAMILY_ID = "1";
263
+ const AUTHORITY_METADATA_CONSTANTS = {
264
+ CACHE_KEY: "authority-metadata",
265
+ REFRESH_TIME_SECONDS: 3600 * 24, // 24 Hours
266
+ };
267
+ const AuthorityMetadataSource = {
268
+ CONFIG: "config",
269
+ CACHE: "cache",
270
+ NETWORK: "network",
271
+ HARDCODED_VALUES: "hardcoded_values",
272
+ };
273
+ const SERVER_TELEM_CONSTANTS = {
274
+ SCHEMA_VERSION: 5,
275
+ MAX_CUR_HEADER_BYTES: 80,
276
+ MAX_LAST_HEADER_BYTES: 330,
277
+ MAX_CACHED_ERRORS: 50,
278
+ CACHE_KEY: "server-telemetry",
279
+ CATEGORY_SEPARATOR: "|",
280
+ VALUE_SEPARATOR: ",",
281
+ OVERFLOW_TRUE: "1",
282
+ OVERFLOW_FALSE: "0",
283
+ UNKNOWN_ERROR: "unknown_error",
284
+ };
285
+ /**
286
+ * Type of the authentication request
287
+ */
288
+ const AuthenticationScheme = {
289
+ BEARER: "Bearer",
290
+ POP: "pop",
291
+ SSH: "ssh-cert",
292
+ };
293
+ /**
294
+ * Constants related to throttling
295
+ */
296
+ const ThrottlingConstants = {
297
+ // Default time to throttle RequestThumbprint in seconds
298
+ DEFAULT_THROTTLE_TIME_SECONDS: 60,
299
+ // Default maximum time to throttle in seconds, overrides what the server sends back
300
+ DEFAULT_MAX_THROTTLE_TIME_SECONDS: 3600,
301
+ // Prefix for storing throttling entries
302
+ THROTTLING_PREFIX: "throttling",
303
+ // Value assigned to the x-ms-lib-capability header to indicate to the server the library supports throttling
304
+ X_MS_LIB_CAPABILITY_VALUE: "retry-after, h429",
305
+ };
306
+ const Errors = {
307
+ INVALID_GRANT_ERROR: "invalid_grant",
308
+ CLIENT_MISMATCH_ERROR: "client_mismatch",
309
+ };
310
+ /**
311
+ * Password grant parameters
312
+ */
313
+ const PasswordGrantConstants = {
314
+ username: "username",
315
+ password: "password",
316
+ };
317
+ /**
318
+ * Response codes
319
+ */
320
+ const ResponseCodes = {
321
+ httpSuccess: 200,
322
+ httpBadRequest: 400,
323
+ };
324
+ /**
325
+ * Region Discovery Sources
326
+ */
327
+ const RegionDiscoverySources = {
328
+ FAILED_AUTO_DETECTION: "1",
329
+ INTERNAL_CACHE: "2",
330
+ ENVIRONMENT_VARIABLE: "3",
331
+ IMDS: "4",
332
+ };
333
+ /**
334
+ * Region Discovery Outcomes
335
+ */
336
+ const RegionDiscoveryOutcomes = {
337
+ CONFIGURED_MATCHES_DETECTED: "1",
338
+ CONFIGURED_NO_AUTO_DETECTION: "2",
339
+ CONFIGURED_NOT_DETECTED: "3",
340
+ AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4",
341
+ AUTO_DETECTION_REQUESTED_FAILED: "5",
342
+ };
343
+ const CacheOutcome = {
344
+ NO_CACHE_HIT: "0",
345
+ FORCE_REFRESH: "1",
346
+ NO_CACHED_ACCESS_TOKEN: "2",
347
+ CACHED_ACCESS_TOKEN_EXPIRED: "3",
348
+ REFRESH_CACHED_ACCESS_TOKEN: "4",
349
+ };
350
+ const JsonTypes = {
351
+ Jwt: "JWT",
352
+ Jwk: "JWK",
353
+ Pop: "pop",
354
+ };
375
355
  const ONE_DAY_IN_MS = 86400000;
376
356
 
377
357
  export { AADAuthorityConstants, AADServerParamKeys, APP_METADATA, AUTHORITY_METADATA_CONSTANTS, AuthenticationScheme, AuthorityMetadataSource, CLIENT_INFO, CacheAccountType, CacheOutcome, CacheType, ClaimsRequestKeys, CodeChallengeMethodValues, Constants, CredentialType, Errors, GrantType, HeaderNames, JsonTypes, OIDC_DEFAULT_SCOPES, OIDC_SCOPES, ONE_DAY_IN_MS, PasswordGrantConstants, PersistentCacheKeys, PromptValue, RegionDiscoveryOutcomes, RegionDiscoverySources, ResponseCodes, ResponseMode, SERVER_TELEM_CONSTANTS, SSOTypes, Separators, THE_FAMILY_ID, ThrottlingConstants };