@azure/msal-common 13.0.0 → 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.
- package/dist/account/AccountInfo.d.ts +31 -31
- package/dist/account/AccountInfo.d.ts.map +1 -1
- package/dist/account/AuthToken.d.ts +20 -20
- package/dist/account/AuthToken.d.ts.map +1 -1
- package/dist/account/AuthToken.js +49 -50
- package/dist/account/AuthToken.js.map +1 -1
- package/dist/account/CcsCredential.d.ts +8 -8
- package/dist/account/CcsCredential.d.ts.map +1 -1
- package/dist/account/CcsCredential.js +9 -9
- package/dist/account/CcsCredential.js.map +1 -1
- package/dist/account/ClientCredentials.d.ts +14 -14
- package/dist/account/ClientCredentials.d.ts.map +1 -1
- package/dist/account/ClientInfo.d.ts +19 -19
- package/dist/account/ClientInfo.d.ts.map +1 -1
- package/dist/account/ClientInfo.js +37 -35
- package/dist/account/ClientInfo.js.map +1 -1
- package/dist/account/DecodedAuthToken.d.ts +8 -8
- package/dist/account/DecodedAuthToken.d.ts.map +1 -1
- package/dist/account/TokenClaims.d.ts +65 -65
- package/dist/account/TokenClaims.d.ts.map +1 -1
- package/dist/authority/Authority.d.ts +228 -215
- package/dist/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.js +717 -765
- package/dist/authority/Authority.js.map +1 -1
- package/dist/authority/AuthorityFactory.d.ts +30 -30
- package/dist/authority/AuthorityFactory.d.ts.map +1 -1
- package/dist/authority/AuthorityFactory.js +48 -63
- package/dist/authority/AuthorityFactory.js.map +1 -1
- package/dist/authority/AuthorityMetadata.d.ts +622 -622
- package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
- package/dist/authority/AuthorityMetadata.js +877 -8
- package/dist/authority/AuthorityMetadata.js.map +1 -1
- package/dist/authority/AuthorityOptions.d.ts +18 -18
- package/dist/authority/AuthorityOptions.d.ts.map +1 -1
- package/dist/authority/AuthorityOptions.js +19 -19
- package/dist/authority/AuthorityOptions.js.map +1 -1
- package/dist/authority/AuthorityType.d.ts +9 -9
- package/dist/authority/AuthorityType.js +14 -14
- package/dist/authority/AuthorityType.js.map +1 -1
- package/dist/authority/AzureRegion.d.ts +1 -1
- package/dist/authority/AzureRegion.d.ts.map +1 -1
- package/dist/authority/AzureRegionConfiguration.d.ts +5 -5
- package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -1
- package/dist/authority/CloudDiscoveryMetadata.d.ts +5 -5
- package/dist/authority/CloudDiscoveryMetadata.d.ts.map +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts +13 -13
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.js +8 -8
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.js.map +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +9 -9
- package/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.js +8 -8
- package/dist/authority/CloudInstanceDiscoveryResponse.js.map +1 -1
- package/dist/authority/ImdsOptions.d.ts +5 -5
- package/dist/authority/ImdsOptions.d.ts.map +1 -1
- package/dist/authority/OpenIdConfigResponse.d.ts +11 -11
- package/dist/authority/OpenIdConfigResponse.d.ts.map +1 -1
- package/dist/authority/OpenIdConfigResponse.js +10 -10
- package/dist/authority/OpenIdConfigResponse.js.map +1 -1
- package/dist/authority/ProtocolMode.d.ts +7 -7
- package/dist/authority/ProtocolMode.js +12 -12
- package/dist/authority/ProtocolMode.js.map +1 -1
- package/dist/authority/RegionDiscovery.d.ts +30 -30
- package/dist/authority/RegionDiscovery.d.ts.map +1 -1
- package/dist/authority/RegionDiscovery.js +110 -132
- package/dist/authority/RegionDiscovery.js.map +1 -1
- package/dist/authority/RegionDiscoveryMetadata.d.ts +6 -6
- package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -1
- package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +15 -15
- package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -1
- package/dist/cache/CacheManager.d.ts +443 -443
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.js +1012 -1047
- package/dist/cache/CacheManager.js.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts +56 -56
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.js +112 -113
- package/dist/cache/entities/AccessTokenEntity.js.map +1 -1
- package/dist/cache/entities/AccountEntity.d.ts +99 -99
- package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccountEntity.js +249 -237
- package/dist/cache/entities/AccountEntity.js.map +1 -1
- package/dist/cache/entities/AppMetadataEntity.d.ts +39 -39
- package/dist/cache/entities/AppMetadataEntity.d.ts.map +1 -1
- package/dist/cache/entities/AppMetadataEntity.js +67 -68
- package/dist/cache/entities/AppMetadataEntity.js.map +1 -1
- package/dist/cache/entities/AuthorityMetadataEntity.d.ts +47 -47
- package/dist/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -1
- package/dist/cache/entities/AuthorityMetadataEntity.js +78 -75
- package/dist/cache/entities/AuthorityMetadataEntity.js.map +1 -1
- package/dist/cache/entities/CacheRecord.d.ts +13 -13
- package/dist/cache/entities/CacheRecord.d.ts.map +1 -1
- package/dist/cache/entities/CacheRecord.js +14 -15
- package/dist/cache/entities/CacheRecord.js.map +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts +88 -88
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/dist/cache/entities/CredentialEntity.js +137 -136
- package/dist/cache/entities/CredentialEntity.js.map +1 -1
- package/dist/cache/entities/IdTokenEntity.d.ts +34 -34
- package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/IdTokenEntity.js +57 -63
- package/dist/cache/entities/IdTokenEntity.js.map +1 -1
- package/dist/cache/entities/RefreshTokenEntity.d.ts +36 -36
- package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/RefreshTokenEntity.js +60 -66
- package/dist/cache/entities/RefreshTokenEntity.js.map +1 -1
- package/dist/cache/entities/ServerTelemetryEntity.d.ts +12 -12
- package/dist/cache/entities/ServerTelemetryEntity.d.ts.map +1 -1
- package/dist/cache/entities/ServerTelemetryEntity.js +28 -29
- package/dist/cache/entities/ServerTelemetryEntity.js.map +1 -1
- package/dist/cache/entities/ThrottlingEntity.d.ts +13 -13
- package/dist/cache/entities/ThrottlingEntity.js +24 -26
- package/dist/cache/entities/ThrottlingEntity.js.map +1 -1
- package/dist/cache/interface/ICacheManager.d.ts +165 -165
- package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
- package/dist/cache/interface/ICachePlugin.d.ts +5 -5
- package/dist/cache/interface/ISerializableTokenCache.d.ts +4 -4
- package/dist/cache/persistence/TokenCacheContext.d.ts +23 -23
- package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -1
- package/dist/cache/persistence/TokenCacheContext.js +26 -35
- package/dist/cache/persistence/TokenCacheContext.js.map +1 -1
- package/dist/cache/utils/CacheTypes.d.ts +62 -62
- package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts +71 -71
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.js +435 -478
- package/dist/client/AuthorizationCodeClient.js.map +1 -1
- package/dist/client/BaseClient.d.ts +50 -50
- package/dist/client/BaseClient.d.ts.map +1 -1
- package/dist/client/BaseClient.js +93 -101
- package/dist/client/BaseClient.js.map +1 -1
- package/dist/client/RefreshTokenClient.d.ts +34 -34
- package/dist/client/RefreshTokenClient.d.ts.map +1 -1
- package/dist/client/RefreshTokenClient.js +241 -274
- package/dist/client/RefreshTokenClient.js.map +1 -1
- package/dist/client/SilentFlowClient.d.ts +24 -24
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.js +95 -123
- package/dist/client/SilentFlowClient.js.map +1 -1
- package/dist/config/AppTokenProvider.d.ts +38 -38
- package/dist/config/AppTokenProvider.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.d.ts +133 -133
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.js +88 -91
- package/dist/config/ClientConfiguration.js.map +1 -1
- package/dist/crypto/ICrypto.d.ts +62 -62
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.js +42 -73
- package/dist/crypto/ICrypto.js.map +1 -1
- package/dist/crypto/IGuidGenerator.d.ts +4 -4
- package/dist/crypto/JoseHeader.d.ts +21 -21
- package/dist/crypto/JoseHeader.d.ts.map +1 -1
- package/dist/crypto/JoseHeader.js +37 -38
- package/dist/crypto/JoseHeader.js.map +1 -1
- package/dist/crypto/PopTokenGenerator.d.ts +57 -57
- package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
- package/dist/crypto/PopTokenGenerator.js +84 -108
- package/dist/crypto/PopTokenGenerator.js.map +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts +11 -11
- package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
- package/dist/error/AuthError.d.ts +47 -47
- package/dist/error/AuthError.d.ts.map +1 -1
- package/dist/error/AuthError.js +52 -55
- package/dist/error/AuthError.js.map +1 -1
- package/dist/error/ClientAuthError.d.ts +412 -404
- package/dist/error/ClientAuthError.d.ts.map +1 -1
- package/dist/error/ClientAuthError.js +520 -514
- package/dist/error/ClientAuthError.js.map +1 -1
- package/dist/error/ClientConfigurationError.d.ts +198 -198
- package/dist/error/ClientConfigurationError.d.ts.map +1 -1
- package/dist/error/ClientConfigurationError.js +250 -254
- package/dist/error/ClientConfigurationError.js.map +1 -1
- package/dist/error/InteractionRequiredAuthError.d.ts +59 -59
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.js +79 -78
- package/dist/error/InteractionRequiredAuthError.js.map +1 -1
- package/dist/error/JoseHeaderError.d.ts +28 -28
- package/dist/error/JoseHeaderError.d.ts.map +1 -1
- package/dist/error/JoseHeaderError.js +40 -44
- package/dist/error/JoseHeaderError.js.map +1 -1
- package/dist/error/ServerError.d.ts +7 -7
- package/dist/error/ServerError.d.ts.map +1 -1
- package/dist/error/ServerError.js +15 -19
- package/dist/error/ServerError.js.map +1 -1
- package/dist/index.cjs.js +8890 -9111
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +93 -94
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/logger/Logger.d.ts +95 -95
- package/dist/logger/Logger.d.ts.map +1 -1
- package/dist/logger/Logger.js +198 -188
- package/dist/logger/Logger.js.map +1 -1
- package/dist/network/INetworkModule.d.ts +29 -29
- package/dist/network/INetworkModule.d.ts.map +1 -1
- package/dist/network/INetworkModule.js +14 -14
- package/dist/network/INetworkModule.js.map +1 -1
- package/dist/network/NetworkManager.d.ts +32 -31
- package/dist/network/NetworkManager.d.ts.map +1 -1
- package/dist/network/NetworkManager.js +34 -48
- package/dist/network/NetworkManager.js.map +1 -1
- package/dist/network/RequestThumbprint.d.ts +16 -16
- package/dist/network/RequestThumbprint.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.d.ts +41 -41
- package/dist/network/ThrottlingUtils.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.js +95 -94
- package/dist/network/ThrottlingUtils.js.map +1 -1
- package/dist/packageMetadata.d.ts +2 -2
- package/dist/packageMetadata.d.ts.map +1 -1
- package/dist/packageMetadata.js +4 -4
- package/dist/packageMetadata.js.map +1 -1
- package/dist/request/AuthenticationHeaderParser.d.ts +19 -19
- package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -1
- package/dist/request/AuthenticationHeaderParser.js +56 -57
- package/dist/request/AuthenticationHeaderParser.js.map +1 -1
- package/dist/request/BaseAuthRequest.d.ts +37 -37
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationCodeRequest.d.ts +27 -27
- package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationUrlRequest.d.ts +50 -50
- package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/CommonClientCredentialRequest.d.ts +17 -17
- package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
- package/dist/request/CommonDeviceCodeRequest.d.ts +21 -21
- package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
- package/dist/request/CommonEndSessionRequest.d.ts +21 -21
- package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
- package/dist/request/CommonOnBehalfOfRequest.d.ts +13 -13
- package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
- package/dist/request/CommonRefreshTokenRequest.d.ts +19 -19
- package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/CommonSilentFlowRequest.d.ts +18 -18
- package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
- package/dist/request/CommonUsernamePasswordRequest.d.ts +17 -17
- package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
- package/dist/request/NativeRequest.d.ts +19 -19
- package/dist/request/NativeRequest.d.ts.map +1 -1
- package/dist/request/NativeSignOutRequest.d.ts +5 -5
- package/dist/request/NativeSignOutRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts +216 -216
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.js +376 -378
- package/dist/request/RequestParameterBuilder.js.map +1 -1
- package/dist/request/RequestValidator.d.ts +33 -33
- package/dist/request/RequestValidator.d.ts.map +1 -1
- package/dist/request/RequestValidator.js +84 -89
- package/dist/request/RequestValidator.js.map +1 -1
- package/dist/request/ScopeSet.d.ts +88 -88
- package/dist/request/ScopeSet.d.ts.map +1 -1
- package/dist/request/ScopeSet.js +198 -198
- package/dist/request/ScopeSet.js.map +1 -1
- package/dist/response/AuthenticationResult.d.ts +39 -39
- package/dist/response/AuthenticationResult.d.ts.map +1 -1
- package/dist/response/AuthorizationCodePayload.d.ts +13 -13
- package/dist/response/AuthorizationCodePayload.d.ts.map +1 -1
- package/dist/response/DeviceCodeResponse.d.ts +25 -25
- package/dist/response/DeviceCodeResponse.d.ts.map +1 -1
- package/dist/response/ExternalTokenResponse.d.ts +15 -15
- package/dist/response/ExternalTokenResponse.d.ts.map +1 -1
- package/dist/response/IMDSBadResponse.d.ts +4 -4
- package/dist/response/IMDSBadResponse.d.ts.map +1 -1
- package/dist/response/ResponseHandler.d.ts +72 -72
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.js +301 -286
- package/dist/response/ResponseHandler.js.map +1 -1
- package/dist/response/ServerAuthorizationCodeResponse.d.ts +25 -25
- package/dist/response/ServerAuthorizationCodeResponse.d.ts.map +1 -1
- package/dist/response/ServerAuthorizationTokenResponse.d.ts +44 -44
- package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
- package/dist/telemetry/performance/IPerformanceClient.d.ts +42 -43
- package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/IPerformanceMeasurement.d.ts +5 -5
- package/dist/telemetry/performance/PerformanceClient.d.ts +189 -197
- package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.js +407 -402
- package/dist/telemetry/performance/PerformanceClient.js.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.d.ts +439 -439
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.js +227 -227
- package/dist/telemetry/performance/PerformanceEvent.js.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.d.ts +19 -17
- package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.js +37 -46
- package/dist/telemetry/performance/StubPerformanceClient.js.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.d.ts +65 -66
- package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.js +199 -161
- package/dist/telemetry/server/ServerTelemetryManager.js.map +1 -1
- package/dist/telemetry/server/ServerTelemetryRequest.d.ts +8 -8
- package/dist/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -1
- package/dist/url/IUri.d.ts +12 -12
- package/dist/url/UrlString.d.ts +70 -70
- package/dist/url/UrlString.d.ts.map +1 -1
- package/dist/url/UrlString.js +243 -232
- package/dist/url/UrlString.js.map +1 -1
- package/dist/utils/Constants.d.ts +331 -331
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.js +374 -373
- package/dist/utils/Constants.js.map +1 -1
- package/dist/utils/MsalTypes.d.ts +6 -6
- package/dist/utils/MsalTypes.d.ts.map +1 -1
- package/dist/utils/ProtocolUtils.d.ts +42 -42
- package/dist/utils/ProtocolUtils.d.ts.map +1 -1
- package/dist/utils/ProtocolUtils.js +72 -69
- package/dist/utils/ProtocolUtils.js.map +1 -1
- package/dist/utils/StringUtils.d.ts +53 -53
- package/dist/utils/StringUtils.d.ts.map +1 -1
- package/dist/utils/StringUtils.js +125 -123
- package/dist/utils/StringUtils.js.map +1 -1
- package/dist/utils/TimeUtils.d.ts +27 -27
- package/dist/utils/TimeUtils.d.ts.map +1 -1
- package/dist/utils/TimeUtils.js +46 -49
- package/dist/utils/TimeUtils.js.map +1 -1
- package/package.json +10 -7
- package/dist/_virtual/_tslib.js +0 -90
- package/dist/_virtual/_tslib.js.map +0 -1
- package/dist/client/ClientCredentialClient.d.ts +0 -38
- package/dist/client/ClientCredentialClient.d.ts.map +0 -1
- package/dist/client/ClientCredentialClient.js +0 -203
- package/dist/client/ClientCredentialClient.js.map +0 -1
- package/dist/client/DeviceCodeClient.d.ts +0 -57
- package/dist/client/DeviceCodeClient.d.ts.map +0 -1
- package/dist/client/DeviceCodeClient.js +0 -250
- package/dist/client/DeviceCodeClient.js.map +0 -1
- package/dist/client/OnBehalfOfClient.d.ts +0 -51
- package/dist/client/OnBehalfOfClient.d.ts.map +0 -1
- package/dist/client/OnBehalfOfClient.js +0 -248
- package/dist/client/OnBehalfOfClient.js.map +0 -1
- package/dist/client/UsernamePasswordClient.d.ts +0 -29
- package/dist/client/UsernamePasswordClient.d.ts.map +0 -1
- package/dist/client/UsernamePasswordClient.js +0 -129
- package/dist/client/UsernamePasswordClient.js.map +0 -1
package/dist/utils/Constants.js
CHANGED
|
@@ -1,377 +1,378 @@
|
|
|
1
|
-
/*! @azure/msal-common
|
|
1
|
+
/*! @azure/msal-common v14.0.0-alpha.2 2023-05-17 */
|
|
2
2
|
'use strict';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Constants.
|
|
70
|
-
]
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
HeaderNames["
|
|
78
|
-
HeaderNames["
|
|
79
|
-
HeaderNames["
|
|
80
|
-
HeaderNames["
|
|
81
|
-
HeaderNames["
|
|
82
|
-
HeaderNames["
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
PersistentCacheKeys["
|
|
91
|
-
PersistentCacheKeys["
|
|
92
|
-
PersistentCacheKeys["
|
|
93
|
-
PersistentCacheKeys["
|
|
94
|
-
PersistentCacheKeys["
|
|
95
|
-
PersistentCacheKeys["
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
AADAuthorityConstants["
|
|
104
|
-
AADAuthorityConstants["
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
AADServerParamKeys["
|
|
113
|
-
AADServerParamKeys["
|
|
114
|
-
AADServerParamKeys["
|
|
115
|
-
AADServerParamKeys["
|
|
116
|
-
AADServerParamKeys["
|
|
117
|
-
AADServerParamKeys["
|
|
118
|
-
AADServerParamKeys["
|
|
119
|
-
AADServerParamKeys["
|
|
120
|
-
AADServerParamKeys["
|
|
121
|
-
AADServerParamKeys["
|
|
122
|
-
AADServerParamKeys["
|
|
123
|
-
AADServerParamKeys["
|
|
124
|
-
AADServerParamKeys["
|
|
125
|
-
AADServerParamKeys["
|
|
126
|
-
AADServerParamKeys["
|
|
127
|
-
AADServerParamKeys["
|
|
128
|
-
AADServerParamKeys["
|
|
129
|
-
AADServerParamKeys["
|
|
130
|
-
AADServerParamKeys["
|
|
131
|
-
AADServerParamKeys["
|
|
132
|
-
AADServerParamKeys["
|
|
133
|
-
AADServerParamKeys["
|
|
134
|
-
AADServerParamKeys["
|
|
135
|
-
AADServerParamKeys["
|
|
136
|
-
AADServerParamKeys["
|
|
137
|
-
AADServerParamKeys["
|
|
138
|
-
AADServerParamKeys["
|
|
139
|
-
AADServerParamKeys["
|
|
140
|
-
AADServerParamKeys["
|
|
141
|
-
AADServerParamKeys["
|
|
142
|
-
AADServerParamKeys["
|
|
143
|
-
AADServerParamKeys["
|
|
144
|
-
AADServerParamKeys["
|
|
145
|
-
AADServerParamKeys["
|
|
146
|
-
AADServerParamKeys["
|
|
147
|
-
AADServerParamKeys["
|
|
148
|
-
AADServerParamKeys["
|
|
149
|
-
AADServerParamKeys["
|
|
150
|
-
AADServerParamKeys["
|
|
151
|
-
AADServerParamKeys["
|
|
152
|
-
AADServerParamKeys["
|
|
153
|
-
AADServerParamKeys["
|
|
154
|
-
AADServerParamKeys["
|
|
155
|
-
AADServerParamKeys["
|
|
156
|
-
AADServerParamKeys["
|
|
157
|
-
AADServerParamKeys["
|
|
158
|
-
AADServerParamKeys["
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
ClaimsRequestKeys["
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
SSOTypes["
|
|
188
|
-
SSOTypes["
|
|
189
|
-
SSOTypes["
|
|
190
|
-
SSOTypes["
|
|
191
|
-
SSOTypes["
|
|
192
|
-
SSOTypes["
|
|
193
|
-
SSOTypes["
|
|
194
|
-
SSOTypes["
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
ResponseMode["
|
|
210
|
-
ResponseMode["
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
GrantType["
|
|
219
|
-
GrantType["
|
|
220
|
-
GrantType["
|
|
221
|
-
GrantType["
|
|
222
|
-
GrantType["
|
|
223
|
-
GrantType["
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
CacheAccountType["
|
|
232
|
-
CacheAccountType["
|
|
233
|
-
CacheAccountType["
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
Separators["
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
CredentialType["
|
|
250
|
-
CredentialType["
|
|
251
|
-
CredentialType["
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
CacheType[CacheType["
|
|
260
|
-
CacheType[CacheType["
|
|
261
|
-
CacheType[CacheType["
|
|
262
|
-
CacheType[CacheType["
|
|
263
|
-
CacheType[CacheType["
|
|
264
|
-
CacheType[CacheType["
|
|
265
|
-
CacheType[CacheType["
|
|
266
|
-
CacheType[CacheType["
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
AuthorityMetadataSource["
|
|
282
|
-
AuthorityMetadataSource["
|
|
283
|
-
AuthorityMetadataSource["
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
AuthenticationScheme["
|
|
304
|
-
AuthenticationScheme["
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
PasswordGrantConstants["
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
ResponseCodes[ResponseCodes["
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
RegionDiscoverySources["
|
|
346
|
-
RegionDiscoverySources["
|
|
347
|
-
RegionDiscoverySources["
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
RegionDiscoveryOutcomes["
|
|
356
|
-
RegionDiscoveryOutcomes["
|
|
357
|
-
RegionDiscoveryOutcomes["
|
|
358
|
-
RegionDiscoveryOutcomes["
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
CacheOutcome["
|
|
364
|
-
CacheOutcome["
|
|
365
|
-
CacheOutcome["
|
|
366
|
-
CacheOutcome["
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
JsonTypes["
|
|
372
|
-
JsonTypes["
|
|
373
|
-
|
|
374
|
-
|
|
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 = {}));
|
|
375
|
+
const ONE_DAY_IN_MS = 86400000;
|
|
375
376
|
|
|
376
377
|
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 };
|
|
377
378
|
//# sourceMappingURL=Constants.js.map
|