@azure/msal-common 14.0.0-alpha.1 → 14.0.0-alpha.2

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 (167) 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 +8 -8
  7. package/dist/account/CcsCredential.js +9 -9
  8. package/dist/account/ClientCredentials.d.ts +14 -14
  9. package/dist/account/ClientInfo.d.ts +19 -19
  10. package/dist/account/ClientInfo.js +37 -37
  11. package/dist/account/DecodedAuthToken.d.ts +8 -8
  12. package/dist/account/TokenClaims.d.ts +65 -65
  13. package/dist/authority/Authority.d.ts +228 -215
  14. package/dist/authority/Authority.d.ts.map +1 -1
  15. package/dist/authority/Authority.js +716 -682
  16. package/dist/authority/Authority.js.map +1 -1
  17. package/dist/authority/AuthorityFactory.d.ts +30 -30
  18. package/dist/authority/AuthorityFactory.js +47 -47
  19. package/dist/authority/AuthorityMetadata.d.ts +622 -622
  20. package/dist/authority/AuthorityMetadata.js +876 -876
  21. package/dist/authority/AuthorityOptions.d.ts +18 -18
  22. package/dist/authority/AuthorityOptions.js +19 -19
  23. package/dist/authority/AuthorityType.d.ts +9 -9
  24. package/dist/authority/AuthorityType.js +14 -14
  25. package/dist/authority/AzureRegion.d.ts +1 -1
  26. package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
  27. package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
  28. package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
  29. package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +8 -8
  30. package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
  31. package/dist/authority/CloudInstanceDiscoveryResponse.js +8 -8
  32. package/dist/authority/ImdsOptions.d.ts +5 -5
  33. package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
  34. package/dist/authority/OpenIdConfigResponse.js +10 -10
  35. package/dist/authority/ProtocolMode.d.ts +7 -7
  36. package/dist/authority/ProtocolMode.js +12 -12
  37. package/dist/authority/RegionDiscovery.d.ts +30 -30
  38. package/dist/authority/RegionDiscovery.js +108 -108
  39. package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
  40. package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
  41. package/dist/cache/CacheManager.d.ts +443 -443
  42. package/dist/cache/CacheManager.js +1011 -1011
  43. package/dist/cache/entities/AccessTokenEntity.d.ts +56 -56
  44. package/dist/cache/entities/AccessTokenEntity.js +111 -111
  45. package/dist/cache/entities/AccountEntity.d.ts +99 -99
  46. package/dist/cache/entities/AccountEntity.js +248 -248
  47. package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
  48. package/dist/cache/entities/AppMetadataEntity.js +66 -66
  49. package/dist/cache/entities/AuthorityMetadataEntity.d.ts +47 -47
  50. package/dist/cache/entities/AuthorityMetadataEntity.js +77 -77
  51. package/dist/cache/entities/CacheRecord.d.ts +13 -13
  52. package/dist/cache/entities/CacheRecord.js +13 -13
  53. package/dist/cache/entities/CredentialEntity.d.ts +88 -88
  54. package/dist/cache/entities/CredentialEntity.js +136 -136
  55. package/dist/cache/entities/IdTokenEntity.d.ts +34 -34
  56. package/dist/cache/entities/IdTokenEntity.js +56 -56
  57. package/dist/cache/entities/RefreshTokenEntity.d.ts +36 -36
  58. package/dist/cache/entities/RefreshTokenEntity.js +59 -59
  59. package/dist/cache/entities/ServerTelemetryEntity.d.ts +12 -12
  60. package/dist/cache/entities/ServerTelemetryEntity.js +27 -27
  61. package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
  62. package/dist/cache/entities/ThrottlingEntity.js +23 -23
  63. package/dist/cache/interface/ICacheManager.d.ts +165 -165
  64. package/dist/cache/interface/ICachePlugin.d.ts +5 -5
  65. package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
  66. package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
  67. package/dist/cache/persistence/TokenCacheContext.js +25 -25
  68. package/dist/cache/utils/CacheTypes.d.ts +62 -62
  69. package/dist/client/AuthorizationCodeClient.d.ts +71 -71
  70. package/dist/client/AuthorizationCodeClient.js +433 -433
  71. package/dist/client/BaseClient.d.ts +50 -50
  72. package/dist/client/BaseClient.js +92 -92
  73. package/dist/client/RefreshTokenClient.d.ts +34 -34
  74. package/dist/client/RefreshTokenClient.js +239 -239
  75. package/dist/client/SilentFlowClient.d.ts +24 -24
  76. package/dist/client/SilentFlowClient.js +94 -94
  77. package/dist/config/AppTokenProvider.d.ts +38 -38
  78. package/dist/config/ClientConfiguration.d.ts +133 -133
  79. package/dist/config/ClientConfiguration.js +88 -88
  80. package/dist/crypto/ICrypto.d.ts +62 -62
  81. package/dist/crypto/ICrypto.js +42 -42
  82. package/dist/crypto/IGuidGenerator.d.ts +4 -4
  83. package/dist/crypto/JoseHeader.d.ts +21 -21
  84. package/dist/crypto/JoseHeader.js +36 -36
  85. package/dist/crypto/PopTokenGenerator.d.ts +57 -57
  86. package/dist/crypto/PopTokenGenerator.js +83 -83
  87. package/dist/crypto/SignedHttpRequest.d.ts +11 -11
  88. package/dist/error/AuthError.d.ts +47 -47
  89. package/dist/error/AuthError.js +51 -51
  90. package/dist/error/ClientAuthError.d.ts +412 -412
  91. package/dist/error/ClientAuthError.js +519 -519
  92. package/dist/error/ClientConfigurationError.d.ts +198 -198
  93. package/dist/error/ClientConfigurationError.js +249 -249
  94. package/dist/error/InteractionRequiredAuthError.d.ts +59 -59
  95. package/dist/error/InteractionRequiredAuthError.js +78 -78
  96. package/dist/error/JoseHeaderError.d.ts +28 -28
  97. package/dist/error/JoseHeaderError.js +39 -39
  98. package/dist/error/ServerError.d.ts +7 -7
  99. package/dist/error/ServerError.js +14 -14
  100. package/dist/index.cjs.js +8843 -8809
  101. package/dist/index.cjs.js.map +1 -1
  102. package/dist/index.d.ts +93 -93
  103. package/dist/index.js +1 -1
  104. package/dist/logger/Logger.d.ts +95 -95
  105. package/dist/logger/Logger.js +197 -197
  106. package/dist/network/INetworkModule.d.ts +29 -29
  107. package/dist/network/INetworkModule.js +14 -14
  108. package/dist/network/NetworkManager.d.ts +32 -32
  109. package/dist/network/NetworkManager.js +33 -33
  110. package/dist/network/RequestThumbprint.d.ts +16 -16
  111. package/dist/network/ThrottlingUtils.d.ts +41 -41
  112. package/dist/network/ThrottlingUtils.js +94 -94
  113. package/dist/packageMetadata.d.ts +2 -2
  114. package/dist/packageMetadata.js +4 -4
  115. package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
  116. package/dist/request/AuthenticationHeaderParser.js +55 -55
  117. package/dist/request/BaseAuthRequest.d.ts +37 -37
  118. package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
  119. package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
  120. package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
  121. package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
  122. package/dist/request/CommonEndSessionRequest.d.ts +21 -21
  123. package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
  124. package/dist/request/CommonRefreshTokenRequest.d.ts +19 -19
  125. package/dist/request/CommonSilentFlowRequest.d.ts +18 -18
  126. package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
  127. package/dist/request/NativeRequest.d.ts +19 -19
  128. package/dist/request/NativeSignOutRequest.d.ts +5 -5
  129. package/dist/request/RequestParameterBuilder.d.ts +216 -216
  130. package/dist/request/RequestParameterBuilder.js +374 -374
  131. package/dist/request/RequestValidator.d.ts +33 -33
  132. package/dist/request/RequestValidator.js +83 -83
  133. package/dist/request/ScopeSet.d.ts +88 -88
  134. package/dist/request/ScopeSet.js +197 -197
  135. package/dist/response/AuthenticationResult.d.ts +39 -39
  136. package/dist/response/AuthorizationCodePayload.d.ts +13 -13
  137. package/dist/response/DeviceCodeResponse.d.ts +25 -25
  138. package/dist/response/ExternalTokenResponse.d.ts +15 -15
  139. package/dist/response/IMDSBadResponse.d.ts +4 -4
  140. package/dist/response/ResponseHandler.d.ts +72 -72
  141. package/dist/response/ResponseHandler.js +300 -300
  142. package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
  143. package/dist/response/ServerAuthorizationTokenResponse.d.ts +44 -44
  144. package/dist/telemetry/performance/IPerformanceClient.d.ts +42 -42
  145. package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
  146. package/dist/telemetry/performance/PerformanceClient.d.ts +189 -189
  147. package/dist/telemetry/performance/PerformanceClient.js +406 -406
  148. package/dist/telemetry/performance/PerformanceEvent.d.ts +439 -439
  149. package/dist/telemetry/performance/PerformanceEvent.js +227 -227
  150. package/dist/telemetry/performance/StubPerformanceClient.d.ts +19 -19
  151. package/dist/telemetry/performance/StubPerformanceClient.js +36 -36
  152. package/dist/telemetry/server/ServerTelemetryManager.d.ts +65 -65
  153. package/dist/telemetry/server/ServerTelemetryManager.js +196 -196
  154. package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
  155. package/dist/url/IUri.d.ts +12 -12
  156. package/dist/url/UrlString.d.ts +70 -70
  157. package/dist/url/UrlString.js +242 -242
  158. package/dist/utils/Constants.d.ts +331 -331
  159. package/dist/utils/Constants.js +373 -373
  160. package/dist/utils/MsalTypes.d.ts +6 -6
  161. package/dist/utils/ProtocolUtils.d.ts +42 -42
  162. package/dist/utils/ProtocolUtils.js +71 -71
  163. package/dist/utils/StringUtils.d.ts +53 -53
  164. package/dist/utils/StringUtils.js +124 -124
  165. package/dist/utils/TimeUtils.d.ts +27 -27
  166. package/dist/utils/TimeUtils.js +45 -45
  167. package/package.json +79 -79
@@ -1,332 +1,332 @@
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 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;
332
332
  //# sourceMappingURL=Constants.d.ts.map