@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,332 +1,346 @@
1
- export declare const Constants: {
2
- LIBRARY_NAME: string;
3
- SKU: string;
4
- CACHE_PREFIX: string;
5
- DEFAULT_AUTHORITY: string;
6
- DEFAULT_AUTHORITY_HOST: string;
7
- DEFAULT_COMMON_TENANT: string;
8
- ADFS: string;
9
- DSTS: string;
10
- AAD_INSTANCE_DISCOVERY_ENDPT: string;
11
- CIAM_AUTH_URL: string;
12
- AAD_TENANT_DOMAIN_SUFFIX: string;
13
- RESOURCE_DELIM: string;
14
- NO_ACCOUNT: string;
15
- CLAIMS: string;
16
- CONSUMER_UTID: string;
17
- OPENID_SCOPE: string;
18
- PROFILE_SCOPE: string;
19
- OFFLINE_ACCESS_SCOPE: string;
20
- EMAIL_SCOPE: string;
21
- CODE_RESPONSE_TYPE: string;
22
- CODE_GRANT_TYPE: string;
23
- RT_GRANT_TYPE: string;
24
- FRAGMENT_RESPONSE_MODE: string;
25
- S256_CODE_CHALLENGE_METHOD: string;
26
- URL_FORM_CONTENT_TYPE: string;
27
- AUTHORIZATION_PENDING: string;
28
- NOT_DEFINED: string;
29
- EMPTY_STRING: string;
30
- NOT_APPLICABLE: string;
31
- FORWARD_SLASH: string;
32
- IMDS_ENDPOINT: string;
33
- IMDS_VERSION: string;
34
- IMDS_TIMEOUT: number;
35
- AZURE_REGION_AUTO_DISCOVER_FLAG: string;
36
- REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: string;
37
- REGIONAL_AUTH_NON_MSI_QUERY_STRING: string;
38
- KNOWN_PUBLIC_CLOUDS: string[];
39
- TOKEN_RESPONSE_TYPE: string;
40
- ID_TOKEN_RESPONSE_TYPE: string;
41
- SHR_NONCE_VALIDITY: number;
42
- INVALID_INSTANCE: string;
43
- };
44
- export declare const OIDC_DEFAULT_SCOPES: string[];
45
- export declare const OIDC_SCOPES: string[];
46
- /**
47
- * Request header names
48
- */
49
- export declare enum HeaderNames {
50
- CONTENT_TYPE = "Content-Type",
51
- RETRY_AFTER = "Retry-After",
52
- CCS_HEADER = "X-AnchorMailbox",
53
- WWWAuthenticate = "WWW-Authenticate",
54
- AuthenticationInfo = "Authentication-Info",
55
- X_MS_REQUEST_ID = "x-ms-request-id",
56
- X_MS_HTTP_VERSION = "x-ms-httpver"
57
- }
58
- /**
59
- * Persistent cache keys MSAL which stay while user is logged in.
60
- */
61
- export declare enum PersistentCacheKeys {
62
- ID_TOKEN = "idtoken",
63
- CLIENT_INFO = "client.info",
64
- ADAL_ID_TOKEN = "adal.idtoken",
65
- ERROR = "error",
66
- ERROR_DESC = "error.description",
67
- ACTIVE_ACCOUNT = "active-account",
68
- ACTIVE_ACCOUNT_FILTERS = "active-account-filters"
69
- }
70
- /**
71
- * String constants related to AAD Authority
72
- */
73
- export declare enum AADAuthorityConstants {
74
- COMMON = "common",
75
- ORGANIZATIONS = "organizations",
76
- CONSUMERS = "consumers"
77
- }
78
- /**
79
- * Keys in the hashParams sent by AAD Server
80
- */
81
- export declare enum AADServerParamKeys {
82
- CLIENT_ID = "client_id",
83
- REDIRECT_URI = "redirect_uri",
84
- RESPONSE_TYPE = "response_type",
85
- RESPONSE_MODE = "response_mode",
86
- GRANT_TYPE = "grant_type",
87
- CLAIMS = "claims",
88
- SCOPE = "scope",
89
- ERROR = "error",
90
- ERROR_DESCRIPTION = "error_description",
91
- ACCESS_TOKEN = "access_token",
92
- ID_TOKEN = "id_token",
93
- REFRESH_TOKEN = "refresh_token",
94
- EXPIRES_IN = "expires_in",
95
- STATE = "state",
96
- NONCE = "nonce",
97
- PROMPT = "prompt",
98
- SESSION_STATE = "session_state",
99
- CLIENT_INFO = "client_info",
100
- CODE = "code",
101
- CODE_CHALLENGE = "code_challenge",
102
- CODE_CHALLENGE_METHOD = "code_challenge_method",
103
- CODE_VERIFIER = "code_verifier",
104
- CLIENT_REQUEST_ID = "client-request-id",
105
- X_CLIENT_SKU = "x-client-SKU",
106
- X_CLIENT_VER = "x-client-VER",
107
- X_CLIENT_OS = "x-client-OS",
108
- X_CLIENT_CPU = "x-client-CPU",
109
- X_CLIENT_CURR_TELEM = "x-client-current-telemetry",
110
- X_CLIENT_LAST_TELEM = "x-client-last-telemetry",
111
- X_MS_LIB_CAPABILITY = "x-ms-lib-capability",
112
- X_APP_NAME = "x-app-name",
113
- X_APP_VER = "x-app-ver",
114
- POST_LOGOUT_URI = "post_logout_redirect_uri",
115
- ID_TOKEN_HINT = "id_token_hint",
116
- DEVICE_CODE = "device_code",
117
- CLIENT_SECRET = "client_secret",
118
- CLIENT_ASSERTION = "client_assertion",
119
- CLIENT_ASSERTION_TYPE = "client_assertion_type",
120
- TOKEN_TYPE = "token_type",
121
- REQ_CNF = "req_cnf",
122
- OBO_ASSERTION = "assertion",
123
- REQUESTED_TOKEN_USE = "requested_token_use",
124
- ON_BEHALF_OF = "on_behalf_of",
125
- FOCI = "foci",
126
- CCS_HEADER = "X-AnchorMailbox",
127
- RETURN_SPA_CODE = "return_spa_code",
128
- NATIVE_BROKER = "nativebroker",
129
- LOGOUT_HINT = "logout_hint"
130
- }
131
- /**
132
- * Claims request keys
133
- */
134
- export declare enum ClaimsRequestKeys {
135
- ACCESS_TOKEN = "access_token",
136
- XMS_CC = "xms_cc"
137
- }
138
- /**
139
- * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
140
- * prompt values kept changing over past couple of years. There are some undocumented prompt values for some
141
- * internal partners too, hence the choice of generic "string" type instead of the "enum"
142
- */
143
- export declare const PromptValue: {
144
- LOGIN: string;
145
- SELECT_ACCOUNT: string;
146
- CONSENT: string;
147
- NONE: string;
148
- CREATE: string;
149
- NO_SESSION: string;
150
- };
151
- /**
152
- * SSO Types - generated to populate hints
153
- */
154
- export declare enum SSOTypes {
155
- ACCOUNT = "account",
156
- SID = "sid",
157
- LOGIN_HINT = "login_hint",
158
- ID_TOKEN = "id_token",
159
- DOMAIN_HINT = "domain_hint",
160
- ORGANIZATIONS = "organizations",
161
- CONSUMERS = "consumers",
162
- ACCOUNT_ID = "accountIdentifier",
163
- HOMEACCOUNT_ID = "homeAccountIdentifier"
164
- }
165
- /**
166
- * allowed values for codeVerifier
167
- */
168
- export declare const CodeChallengeMethodValues: {
169
- PLAIN: string;
170
- S256: string;
171
- };
172
- /**
173
- * The method used to encode the code verifier for the code challenge parameter. can be one
174
- * of plain or s256. if excluded, code challenge is assumed to be plaintext. for more
175
- * information, see the pkce rcf: https://tools.ietf.org/html/rfc7636
176
- */
177
- export declare const CodeChallengeMethodValuesArray: string[];
178
- /**
179
- * allowed values for response_mode
180
- */
181
- export declare enum ResponseMode {
182
- QUERY = "query",
183
- FRAGMENT = "fragment",
184
- FORM_POST = "form_post"
185
- }
186
- /**
187
- * allowed grant_type
188
- */
189
- export declare enum GrantType {
190
- IMPLICIT_GRANT = "implicit",
191
- AUTHORIZATION_CODE_GRANT = "authorization_code",
192
- CLIENT_CREDENTIALS_GRANT = "client_credentials",
193
- RESOURCE_OWNER_PASSWORD_GRANT = "password",
194
- REFRESH_TOKEN_GRANT = "refresh_token",
195
- DEVICE_CODE_GRANT = "device_code",
196
- JWT_BEARER = "urn:ietf:params:oauth:grant-type:jwt-bearer"
197
- }
198
- /**
199
- * Account types in Cache
200
- */
201
- export declare enum CacheAccountType {
202
- MSSTS_ACCOUNT_TYPE = "MSSTS",
203
- ADFS_ACCOUNT_TYPE = "ADFS",
204
- MSAV1_ACCOUNT_TYPE = "MSA",
205
- GENERIC_ACCOUNT_TYPE = "Generic"
206
- }
207
- /**
208
- * Separators used in cache
209
- */
210
- export declare enum Separators {
211
- CACHE_KEY_SEPARATOR = "-",
212
- CLIENT_INFO_SEPARATOR = "."
213
- }
214
- /**
215
- * Credential Type stored in the cache
216
- */
217
- export declare enum CredentialType {
218
- ID_TOKEN = "IdToken",
219
- ACCESS_TOKEN = "AccessToken",
220
- ACCESS_TOKEN_WITH_AUTH_SCHEME = "AccessToken_With_AuthScheme",
221
- REFRESH_TOKEN = "RefreshToken"
222
- }
223
- /**
224
- * Combine all cache types
225
- */
226
- export declare enum CacheType {
227
- ADFS = 1001,
228
- MSA = 1002,
229
- MSSTS = 1003,
230
- GENERIC = 1004,
231
- ACCESS_TOKEN = 2001,
232
- REFRESH_TOKEN = 2002,
233
- ID_TOKEN = 2003,
234
- APP_METADATA = 3001,
235
- UNDEFINED = 9999
236
- }
237
- /**
238
- * More Cache related constants
239
- */
240
- export declare const APP_METADATA = "appmetadata";
241
- export declare const CLIENT_INFO = "client_info";
242
- export declare const THE_FAMILY_ID = "1";
243
- export declare const AUTHORITY_METADATA_CONSTANTS: {
244
- CACHE_KEY: string;
245
- REFRESH_TIME_SECONDS: number;
246
- };
247
- export declare enum AuthorityMetadataSource {
248
- CONFIG = "config",
249
- CACHE = "cache",
250
- NETWORK = "network",
251
- HARDCODED_VALUES = "hardcoded_values"
252
- }
253
- export declare const SERVER_TELEM_CONSTANTS: {
254
- SCHEMA_VERSION: number;
255
- MAX_CUR_HEADER_BYTES: number;
256
- MAX_LAST_HEADER_BYTES: number;
257
- MAX_CACHED_ERRORS: number;
258
- CACHE_KEY: string;
259
- CATEGORY_SEPARATOR: string;
260
- VALUE_SEPARATOR: string;
261
- OVERFLOW_TRUE: string;
262
- OVERFLOW_FALSE: string;
263
- UNKNOWN_ERROR: string;
264
- };
265
- /**
266
- * Type of the authentication request
267
- */
268
- export declare enum AuthenticationScheme {
269
- BEARER = "Bearer",
270
- POP = "pop",
271
- SSH = "ssh-cert"
272
- }
273
- /**
274
- * Constants related to throttling
275
- */
276
- export declare const ThrottlingConstants: {
277
- DEFAULT_THROTTLE_TIME_SECONDS: number;
278
- DEFAULT_MAX_THROTTLE_TIME_SECONDS: number;
279
- THROTTLING_PREFIX: string;
280
- X_MS_LIB_CAPABILITY_VALUE: string;
281
- };
282
- export declare const Errors: {
283
- INVALID_GRANT_ERROR: string;
284
- CLIENT_MISMATCH_ERROR: string;
285
- };
286
- /**
287
- * Password grant parameters
288
- */
289
- export declare enum PasswordGrantConstants {
290
- username = "username",
291
- password = "password"
292
- }
293
- /**
294
- * Response codes
295
- */
296
- export declare enum ResponseCodes {
297
- httpSuccess = 200,
298
- httpBadRequest = 400
299
- }
300
- /**
301
- * Region Discovery Sources
302
- */
303
- export declare enum RegionDiscoverySources {
304
- FAILED_AUTO_DETECTION = "1",
305
- INTERNAL_CACHE = "2",
306
- ENVIRONMENT_VARIABLE = "3",
307
- IMDS = "4"
308
- }
309
- /**
310
- * Region Discovery Outcomes
311
- */
312
- export declare enum RegionDiscoveryOutcomes {
313
- CONFIGURED_MATCHES_DETECTED = "1",
314
- CONFIGURED_NO_AUTO_DETECTION = "2",
315
- CONFIGURED_NOT_DETECTED = "3",
316
- AUTO_DETECTION_REQUESTED_SUCCESSFUL = "4",
317
- AUTO_DETECTION_REQUESTED_FAILED = "5"
318
- }
319
- export declare enum CacheOutcome {
320
- NO_CACHE_HIT = "0",
321
- FORCE_REFRESH = "1",
322
- NO_CACHED_ACCESS_TOKEN = "2",
323
- CACHED_ACCESS_TOKEN_EXPIRED = "3",
324
- REFRESH_CACHED_ACCESS_TOKEN = "4"
325
- }
326
- export declare enum JsonTypes {
327
- Jwt = "JWT",
328
- Jwk = "JWK",
329
- Pop = "pop"
330
- }
331
- export declare const ONE_DAY_IN_MS = 86400000;
1
+ export declare const Constants: {
2
+ LIBRARY_NAME: string;
3
+ SKU: string;
4
+ CACHE_PREFIX: string;
5
+ DEFAULT_AUTHORITY: string;
6
+ DEFAULT_AUTHORITY_HOST: string;
7
+ DEFAULT_COMMON_TENANT: string;
8
+ ADFS: string;
9
+ DSTS: string;
10
+ AAD_INSTANCE_DISCOVERY_ENDPT: string;
11
+ CIAM_AUTH_URL: string;
12
+ AAD_TENANT_DOMAIN_SUFFIX: string;
13
+ RESOURCE_DELIM: string;
14
+ NO_ACCOUNT: string;
15
+ CLAIMS: string;
16
+ CONSUMER_UTID: string;
17
+ OPENID_SCOPE: string;
18
+ PROFILE_SCOPE: string;
19
+ OFFLINE_ACCESS_SCOPE: string;
20
+ EMAIL_SCOPE: string;
21
+ CODE_RESPONSE_TYPE: string;
22
+ CODE_GRANT_TYPE: string;
23
+ RT_GRANT_TYPE: string;
24
+ FRAGMENT_RESPONSE_MODE: string;
25
+ S256_CODE_CHALLENGE_METHOD: string;
26
+ URL_FORM_CONTENT_TYPE: string;
27
+ AUTHORIZATION_PENDING: string;
28
+ NOT_DEFINED: string;
29
+ EMPTY_STRING: string;
30
+ NOT_APPLICABLE: string;
31
+ FORWARD_SLASH: string;
32
+ IMDS_ENDPOINT: string;
33
+ IMDS_VERSION: string;
34
+ IMDS_TIMEOUT: number;
35
+ AZURE_REGION_AUTO_DISCOVER_FLAG: string;
36
+ REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: string;
37
+ REGIONAL_AUTH_NON_MSI_QUERY_STRING: string;
38
+ KNOWN_PUBLIC_CLOUDS: string[];
39
+ TOKEN_RESPONSE_TYPE: string;
40
+ ID_TOKEN_RESPONSE_TYPE: string;
41
+ SHR_NONCE_VALIDITY: number;
42
+ INVALID_INSTANCE: string;
43
+ };
44
+ export declare const OIDC_DEFAULT_SCOPES: string[];
45
+ export declare const OIDC_SCOPES: string[];
46
+ /**
47
+ * Request header names
48
+ */
49
+ export declare const HeaderNames: {
50
+ readonly CONTENT_TYPE: "Content-Type";
51
+ readonly RETRY_AFTER: "Retry-After";
52
+ readonly CCS_HEADER: "X-AnchorMailbox";
53
+ readonly WWWAuthenticate: "WWW-Authenticate";
54
+ readonly AuthenticationInfo: "Authentication-Info";
55
+ readonly X_MS_REQUEST_ID: "x-ms-request-id";
56
+ readonly X_MS_HTTP_VERSION: "x-ms-httpver";
57
+ };
58
+ export type HeaderNames = typeof HeaderNames[keyof typeof HeaderNames];
59
+ /**
60
+ * Persistent cache keys MSAL which stay while user is logged in.
61
+ */
62
+ export declare const PersistentCacheKeys: {
63
+ readonly ID_TOKEN: "idtoken";
64
+ readonly CLIENT_INFO: "client.info";
65
+ readonly ADAL_ID_TOKEN: "adal.idtoken";
66
+ readonly ERROR: "error";
67
+ readonly ERROR_DESC: "error.description";
68
+ readonly ACTIVE_ACCOUNT: "active-account";
69
+ readonly ACTIVE_ACCOUNT_FILTERS: "active-account-filters";
70
+ };
71
+ export type PersistentCacheKeys = typeof PersistentCacheKeys[keyof typeof PersistentCacheKeys];
72
+ /**
73
+ * String constants related to AAD Authority
74
+ */
75
+ export declare const AADAuthorityConstants: {
76
+ readonly COMMON: "common";
77
+ readonly ORGANIZATIONS: "organizations";
78
+ readonly CONSUMERS: "consumers";
79
+ };
80
+ export type AADAuthorityConstants = typeof AADAuthorityConstants[keyof typeof AADAuthorityConstants];
81
+ /**
82
+ * Keys in the hashParams sent by AAD Server
83
+ */
84
+ export declare const AADServerParamKeys: {
85
+ readonly CLIENT_ID: "client_id";
86
+ readonly REDIRECT_URI: "redirect_uri";
87
+ readonly RESPONSE_TYPE: "response_type";
88
+ readonly RESPONSE_MODE: "response_mode";
89
+ readonly GRANT_TYPE: "grant_type";
90
+ readonly CLAIMS: "claims";
91
+ readonly SCOPE: "scope";
92
+ readonly ERROR: "error";
93
+ readonly ERROR_DESCRIPTION: "error_description";
94
+ readonly ACCESS_TOKEN: "access_token";
95
+ readonly ID_TOKEN: "id_token";
96
+ readonly REFRESH_TOKEN: "refresh_token";
97
+ readonly EXPIRES_IN: "expires_in";
98
+ readonly STATE: "state";
99
+ readonly NONCE: "nonce";
100
+ readonly PROMPT: "prompt";
101
+ readonly SESSION_STATE: "session_state";
102
+ readonly CLIENT_INFO: "client_info";
103
+ readonly CODE: "code";
104
+ readonly CODE_CHALLENGE: "code_challenge";
105
+ readonly CODE_CHALLENGE_METHOD: "code_challenge_method";
106
+ readonly CODE_VERIFIER: "code_verifier";
107
+ readonly CLIENT_REQUEST_ID: "client-request-id";
108
+ readonly X_CLIENT_SKU: "x-client-SKU";
109
+ readonly X_CLIENT_VER: "x-client-VER";
110
+ readonly X_CLIENT_OS: "x-client-OS";
111
+ readonly X_CLIENT_CPU: "x-client-CPU";
112
+ readonly X_CLIENT_CURR_TELEM: "x-client-current-telemetry";
113
+ readonly X_CLIENT_LAST_TELEM: "x-client-last-telemetry";
114
+ readonly X_MS_LIB_CAPABILITY: "x-ms-lib-capability";
115
+ readonly X_APP_NAME: "x-app-name";
116
+ readonly X_APP_VER: "x-app-ver";
117
+ readonly POST_LOGOUT_URI: "post_logout_redirect_uri";
118
+ readonly ID_TOKEN_HINT: "id_token_hint";
119
+ readonly DEVICE_CODE: "device_code";
120
+ readonly CLIENT_SECRET: "client_secret";
121
+ readonly CLIENT_ASSERTION: "client_assertion";
122
+ readonly CLIENT_ASSERTION_TYPE: "client_assertion_type";
123
+ readonly TOKEN_TYPE: "token_type";
124
+ readonly REQ_CNF: "req_cnf";
125
+ readonly OBO_ASSERTION: "assertion";
126
+ readonly REQUESTED_TOKEN_USE: "requested_token_use";
127
+ readonly ON_BEHALF_OF: "on_behalf_of";
128
+ readonly FOCI: "foci";
129
+ readonly CCS_HEADER: "X-AnchorMailbox";
130
+ readonly RETURN_SPA_CODE: "return_spa_code";
131
+ readonly NATIVE_BROKER: "nativebroker";
132
+ readonly LOGOUT_HINT: "logout_hint";
133
+ };
134
+ export type AADServerParamKeys = typeof AADServerParamKeys[keyof typeof AADServerParamKeys];
135
+ /**
136
+ * Claims request keys
137
+ */
138
+ export declare const ClaimsRequestKeys: {
139
+ readonly ACCESS_TOKEN: "access_token";
140
+ readonly XMS_CC: "xms_cc";
141
+ };
142
+ export type ClaimsRequestKeys = typeof ClaimsRequestKeys[keyof typeof ClaimsRequestKeys];
143
+ /**
144
+ * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
145
+ * prompt values kept changing over past couple of years. There are some undocumented prompt values for some
146
+ * internal partners too, hence the choice of generic "string" type instead of the "enum"
147
+ */
148
+ export declare const PromptValue: {
149
+ LOGIN: string;
150
+ SELECT_ACCOUNT: string;
151
+ CONSENT: string;
152
+ NONE: string;
153
+ CREATE: string;
154
+ NO_SESSION: string;
155
+ };
156
+ /**
157
+ * SSO Types - generated to populate hints
158
+ */
159
+ export declare const SSOTypes: {
160
+ readonly ACCOUNT: "account";
161
+ readonly SID: "sid";
162
+ readonly LOGIN_HINT: "login_hint";
163
+ readonly ID_TOKEN: "id_token";
164
+ readonly DOMAIN_HINT: "domain_hint";
165
+ readonly ORGANIZATIONS: "organizations";
166
+ readonly CONSUMERS: "consumers";
167
+ readonly ACCOUNT_ID: "accountIdentifier";
168
+ readonly HOMEACCOUNT_ID: "homeAccountIdentifier";
169
+ };
170
+ export type SSOTypes = typeof SSOTypes[keyof typeof SSOTypes];
171
+ /**
172
+ * allowed values for codeVerifier
173
+ */
174
+ export declare const CodeChallengeMethodValues: {
175
+ PLAIN: string;
176
+ S256: string;
177
+ };
178
+ /**
179
+ * allowed values for response_mode
180
+ */
181
+ export declare const ResponseMode: {
182
+ readonly QUERY: "query";
183
+ readonly FRAGMENT: "fragment";
184
+ readonly FORM_POST: "form_post";
185
+ };
186
+ export type ResponseMode = typeof ResponseMode[keyof typeof ResponseMode];
187
+ /**
188
+ * allowed grant_type
189
+ */
190
+ export declare const GrantType: {
191
+ readonly IMPLICIT_GRANT: "implicit";
192
+ readonly AUTHORIZATION_CODE_GRANT: "authorization_code";
193
+ readonly CLIENT_CREDENTIALS_GRANT: "client_credentials";
194
+ readonly RESOURCE_OWNER_PASSWORD_GRANT: "password";
195
+ readonly REFRESH_TOKEN_GRANT: "refresh_token";
196
+ readonly DEVICE_CODE_GRANT: "device_code";
197
+ readonly JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer";
198
+ };
199
+ export type GrantType = typeof GrantType[keyof typeof GrantType];
200
+ /**
201
+ * Account types in Cache
202
+ */
203
+ export declare const CacheAccountType: {
204
+ readonly MSSTS_ACCOUNT_TYPE: "MSSTS";
205
+ readonly ADFS_ACCOUNT_TYPE: "ADFS";
206
+ readonly MSAV1_ACCOUNT_TYPE: "MSA";
207
+ readonly GENERIC_ACCOUNT_TYPE: "Generic";
208
+ };
209
+ export type CacheAccountType = typeof CacheAccountType[keyof typeof CacheAccountType];
210
+ /**
211
+ * Separators used in cache
212
+ */
213
+ export declare const Separators: {
214
+ readonly CACHE_KEY_SEPARATOR: "-";
215
+ readonly CLIENT_INFO_SEPARATOR: ".";
216
+ };
217
+ export type Separators = typeof Separators[keyof typeof Separators];
218
+ /**
219
+ * Credential Type stored in the cache
220
+ */
221
+ export declare const CredentialType: {
222
+ readonly ID_TOKEN: "IdToken";
223
+ readonly ACCESS_TOKEN: "AccessToken";
224
+ readonly ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme";
225
+ readonly REFRESH_TOKEN: "RefreshToken";
226
+ };
227
+ export type CredentialType = typeof CredentialType[keyof typeof CredentialType];
228
+ /**
229
+ * Combine all cache types
230
+ */
231
+ export declare const CacheType: {
232
+ readonly ADFS: 1001;
233
+ readonly MSA: 1002;
234
+ readonly MSSTS: 1003;
235
+ readonly GENERIC: 1004;
236
+ readonly ACCESS_TOKEN: 2001;
237
+ readonly REFRESH_TOKEN: 2002;
238
+ readonly ID_TOKEN: 2003;
239
+ readonly APP_METADATA: 3001;
240
+ readonly UNDEFINED: 9999;
241
+ };
242
+ export type CacheType = typeof CacheType[keyof typeof CacheType];
243
+ /**
244
+ * More Cache related constants
245
+ */
246
+ export declare const APP_METADATA = "appmetadata";
247
+ export declare const CLIENT_INFO = "client_info";
248
+ export declare const THE_FAMILY_ID = "1";
249
+ export declare const AUTHORITY_METADATA_CONSTANTS: {
250
+ CACHE_KEY: string;
251
+ REFRESH_TIME_SECONDS: number;
252
+ };
253
+ export declare const AuthorityMetadataSource: {
254
+ readonly CONFIG: "config";
255
+ readonly CACHE: "cache";
256
+ readonly NETWORK: "network";
257
+ readonly HARDCODED_VALUES: "hardcoded_values";
258
+ };
259
+ export type AuthorityMetadataSource = typeof AuthorityMetadataSource[keyof typeof AuthorityMetadataSource];
260
+ export declare const SERVER_TELEM_CONSTANTS: {
261
+ SCHEMA_VERSION: number;
262
+ MAX_CUR_HEADER_BYTES: number;
263
+ MAX_LAST_HEADER_BYTES: number;
264
+ MAX_CACHED_ERRORS: number;
265
+ CACHE_KEY: string;
266
+ CATEGORY_SEPARATOR: string;
267
+ VALUE_SEPARATOR: string;
268
+ OVERFLOW_TRUE: string;
269
+ OVERFLOW_FALSE: string;
270
+ UNKNOWN_ERROR: string;
271
+ };
272
+ /**
273
+ * Type of the authentication request
274
+ */
275
+ export declare const AuthenticationScheme: {
276
+ readonly BEARER: "Bearer";
277
+ readonly POP: "pop";
278
+ readonly SSH: "ssh-cert";
279
+ };
280
+ export type AuthenticationScheme = typeof AuthenticationScheme[keyof typeof AuthenticationScheme];
281
+ /**
282
+ * Constants related to throttling
283
+ */
284
+ export declare const ThrottlingConstants: {
285
+ DEFAULT_THROTTLE_TIME_SECONDS: number;
286
+ DEFAULT_MAX_THROTTLE_TIME_SECONDS: number;
287
+ THROTTLING_PREFIX: string;
288
+ X_MS_LIB_CAPABILITY_VALUE: string;
289
+ };
290
+ export declare const Errors: {
291
+ INVALID_GRANT_ERROR: string;
292
+ CLIENT_MISMATCH_ERROR: string;
293
+ };
294
+ /**
295
+ * Password grant parameters
296
+ */
297
+ export declare const PasswordGrantConstants: {
298
+ readonly username: "username";
299
+ readonly password: "password";
300
+ };
301
+ export type PasswordGrantConstants = typeof PasswordGrantConstants[keyof typeof PasswordGrantConstants];
302
+ /**
303
+ * Response codes
304
+ */
305
+ export declare const ResponseCodes: {
306
+ readonly httpSuccess: 200;
307
+ readonly httpBadRequest: 400;
308
+ };
309
+ export type ResponseCodes = typeof ResponseCodes[keyof typeof ResponseCodes];
310
+ /**
311
+ * Region Discovery Sources
312
+ */
313
+ export declare const RegionDiscoverySources: {
314
+ readonly FAILED_AUTO_DETECTION: "1";
315
+ readonly INTERNAL_CACHE: "2";
316
+ readonly ENVIRONMENT_VARIABLE: "3";
317
+ readonly IMDS: "4";
318
+ };
319
+ export type RegionDiscoverySources = typeof RegionDiscoverySources[keyof typeof RegionDiscoverySources];
320
+ /**
321
+ * Region Discovery Outcomes
322
+ */
323
+ export declare const RegionDiscoveryOutcomes: {
324
+ readonly CONFIGURED_MATCHES_DETECTED: "1";
325
+ readonly CONFIGURED_NO_AUTO_DETECTION: "2";
326
+ readonly CONFIGURED_NOT_DETECTED: "3";
327
+ readonly AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4";
328
+ readonly AUTO_DETECTION_REQUESTED_FAILED: "5";
329
+ };
330
+ export type RegionDiscoveryOutcomes = typeof RegionDiscoveryOutcomes[keyof typeof RegionDiscoveryOutcomes];
331
+ export declare const CacheOutcome: {
332
+ readonly NO_CACHE_HIT: "0";
333
+ readonly FORCE_REFRESH: "1";
334
+ readonly NO_CACHED_ACCESS_TOKEN: "2";
335
+ readonly CACHED_ACCESS_TOKEN_EXPIRED: "3";
336
+ readonly REFRESH_CACHED_ACCESS_TOKEN: "4";
337
+ };
338
+ export type CacheOutcome = typeof CacheOutcome[keyof typeof CacheOutcome];
339
+ export declare const JsonTypes: {
340
+ readonly Jwt: "JWT";
341
+ readonly Jwk: "JWK";
342
+ readonly Pop: "pop";
343
+ };
344
+ export type JsonTypes = typeof JsonTypes[keyof typeof JsonTypes];
345
+ export declare const ONE_DAY_IN_MS = 86400000;
332
346
  //# sourceMappingURL=Constants.d.ts.map