@azure/msal-common 14.14.2 → 14.15.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.
- package/browser/README.md +1 -0
- package/browser/package.json +5 -0
- package/dist/account/AccountInfo.d.ts +1 -1
- package/dist/account/AccountInfo.d.ts.map +1 -1
- package/dist/account/AccountInfo.mjs +1 -1
- package/dist/account/AuthToken.d.ts +1 -1
- package/dist/account/AuthToken.d.ts.map +1 -1
- package/dist/account/AuthToken.mjs +1 -1
- package/dist/account/CcsCredential.mjs +1 -1
- package/dist/account/ClientInfo.mjs +1 -1
- package/dist/account/TokenClaims.mjs +1 -1
- package/dist/authority/Authority.d.ts +12 -12
- package/dist/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.mjs +1 -1
- package/dist/authority/AuthorityFactory.d.ts +6 -6
- package/dist/authority/AuthorityFactory.d.ts.map +1 -1
- package/dist/authority/AuthorityFactory.mjs +1 -1
- package/dist/authority/AuthorityMetadata.d.ts +6 -6
- package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
- package/dist/authority/AuthorityMetadata.mjs +1 -1
- package/dist/authority/AuthorityOptions.d.ts +4 -4
- package/dist/authority/AuthorityOptions.d.ts.map +1 -1
- package/dist/authority/AuthorityOptions.mjs +1 -1
- package/dist/authority/AuthorityType.mjs +1 -1
- package/dist/authority/AzureRegionConfiguration.d.ts +1 -1
- package/dist/authority/AzureRegionConfiguration.d.ts.map +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.d.ts +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
- package/dist/authority/OIDCOptions.d.ts +1 -1
- package/dist/authority/OIDCOptions.d.ts.map +1 -1
- package/dist/authority/OpenIdConfigResponse.mjs +1 -1
- package/dist/authority/ProtocolMode.mjs +1 -1
- package/dist/authority/RegionDiscovery.d.ts +5 -5
- package/dist/authority/RegionDiscovery.d.ts.map +1 -1
- package/dist/authority/RegionDiscovery.mjs +1 -1
- package/dist/authority/RegionDiscoveryMetadata.d.ts +1 -1
- package/dist/authority/RegionDiscoveryMetadata.d.ts.map +1 -1
- package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts +6 -6
- package/dist/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -1
- package/dist/cache/CacheManager.d.ts +18 -18
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.mjs +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts +2 -2
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccountEntity.d.ts +6 -6
- package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccountEntity.mjs +1 -1
- package/dist/cache/entities/CacheRecord.d.ts +5 -5
- package/dist/cache/entities/CacheRecord.d.ts.map +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/dist/cache/entities/IdTokenEntity.d.ts +1 -1
- package/dist/cache/entities/IdTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/RefreshTokenEntity.d.ts +1 -1
- package/dist/cache/entities/RefreshTokenEntity.d.ts.map +1 -1
- package/dist/cache/interface/ICacheManager.d.ts +12 -12
- package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
- package/dist/cache/interface/ICachePlugin.d.ts +1 -1
- package/dist/cache/interface/ICachePlugin.d.ts.map +1 -1
- package/dist/cache/persistence/TokenCacheContext.d.ts +1 -1
- package/dist/cache/persistence/TokenCacheContext.d.ts.map +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/CacheHelpers.d.ts +9 -9
- package/dist/cache/utils/CacheHelpers.d.ts.map +1 -1
- package/dist/cache/utils/CacheHelpers.mjs +1 -1
- package/dist/cache/utils/CacheTypes.d.ts +11 -11
- package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts +10 -9
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +13 -5
- package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
- package/dist/client/BaseClient.d.ts +13 -13
- package/dist/client/BaseClient.d.ts.map +1 -1
- package/dist/client/BaseClient.mjs +1 -1
- package/dist/client/RefreshTokenClient.d.ts +6 -6
- package/dist/client/RefreshTokenClient.d.ts.map +1 -1
- package/dist/client/RefreshTokenClient.mjs +1 -1
- package/dist/client/SilentFlowClient.d.ts +6 -6
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.mjs +1 -1
- package/dist/config/ClientConfiguration.d.ts +13 -11
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.mjs +2 -1
- package/dist/config/ClientConfiguration.mjs.map +1 -1
- package/dist/constants/AADServerParamKeys.mjs +1 -1
- package/dist/crypto/ICrypto.d.ts +2 -2
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.mjs +1 -1
- package/dist/crypto/JoseHeader.d.ts +1 -1
- package/dist/crypto/JoseHeader.d.ts.map +1 -1
- package/dist/crypto/JoseHeader.mjs +1 -1
- package/dist/crypto/PopTokenGenerator.d.ts +3 -3
- package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
- package/dist/crypto/PopTokenGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
- package/dist/error/AuthError.d.ts +1 -1
- package/dist/error/AuthError.d.ts.map +1 -1
- package/dist/error/AuthError.mjs +1 -1
- package/dist/error/AuthErrorCodes.mjs +1 -1
- package/dist/error/CacheError.d.ts +1 -1
- package/dist/error/CacheError.d.ts.map +1 -1
- package/dist/error/CacheError.mjs +1 -1
- package/dist/error/CacheErrorCodes.mjs +1 -1
- package/dist/error/ClientAuthError.d.ts +2 -2
- package/dist/error/ClientAuthError.d.ts.map +1 -1
- package/dist/error/ClientAuthError.mjs +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +1 -1
- package/dist/error/ClientConfigurationError.d.ts +2 -2
- package/dist/error/ClientConfigurationError.d.ts.map +1 -1
- package/dist/error/ClientConfigurationError.mjs +1 -1
- package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
- package/dist/error/InteractionRequiredAuthError.d.ts +2 -2
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
- package/dist/error/JoseHeaderError.d.ts +2 -2
- package/dist/error/JoseHeaderError.d.ts.map +1 -1
- package/dist/error/JoseHeaderError.mjs +1 -1
- package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
- package/dist/error/ServerError.d.ts +1 -1
- package/dist/error/ServerError.d.ts.map +1 -1
- package/dist/error/ServerError.mjs +1 -1
- package/dist/exports-browser-only.d.ts +10 -0
- package/dist/exports-browser-only.d.ts.map +1 -0
- package/dist/exports-common.d.ts +80 -0
- package/dist/exports-common.d.ts.map +1 -0
- package/dist/exports-node-only.d.ts +18 -0
- package/dist/exports-node-only.d.ts.map +1 -0
- package/dist/index-browser.d.ts +7 -0
- package/dist/index-browser.d.ts.map +1 -0
- package/dist/index-browser.mjs +67 -0
- package/dist/index-browser.mjs.map +1 -0
- package/dist/index-node.d.ts +7 -0
- package/dist/index-node.d.ts.map +1 -0
- package/dist/index-node.mjs +66 -0
- package/dist/index-node.mjs.map +1 -0
- package/dist/index.d.ts +7 -103
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +30 -30
- package/dist/logger/Logger.d.ts +1 -1
- package/dist/logger/Logger.d.ts.map +1 -1
- package/dist/logger/Logger.mjs +1 -1
- package/dist/network/INetworkModule.d.ts +1 -1
- package/dist/network/INetworkModule.d.ts.map +1 -1
- package/dist/network/INetworkModule.mjs +1 -1
- package/dist/network/NetworkManager.d.ts +4 -4
- package/dist/network/NetworkManager.d.ts.map +1 -1
- package/dist/network/NetworkManager.mjs +1 -1
- package/dist/network/RequestThumbprint.d.ts +2 -2
- package/dist/network/RequestThumbprint.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.d.ts +5 -5
- package/dist/network/ThrottlingUtils.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/AuthenticationHeaderParser.mjs +1 -1
- package/dist/request/BaseAuthRequest.d.ts +5 -5
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationCodeRequest.d.ts +3 -3
- package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationUrlRequest.d.ts +4 -4
- package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/CommonClientCredentialRequest.d.ts +3 -3
- package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
- package/dist/request/CommonDeviceCodeRequest.d.ts +3 -3
- package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
- package/dist/request/CommonEndSessionRequest.d.ts +2 -2
- package/dist/request/CommonEndSessionRequest.d.ts.map +1 -1
- package/dist/request/CommonOnBehalfOfRequest.d.ts +1 -1
- package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
- package/dist/request/CommonRefreshTokenRequest.d.ts +3 -3
- package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/CommonSilentFlowRequest.d.ts +3 -3
- package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
- package/dist/request/CommonUsernamePasswordRequest.d.ts +1 -1
- package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
- package/dist/request/NativeRequest.d.ts +1 -1
- package/dist/request/NativeRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts +5 -5
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.mjs +1 -1
- package/dist/request/RequestValidator.mjs +1 -1
- package/dist/request/ScopeSet.mjs +1 -1
- package/dist/response/AuthenticationResult.d.ts +1 -1
- package/dist/response/AuthenticationResult.d.ts.map +1 -1
- package/dist/response/ExternalTokenResponse.d.ts +1 -1
- package/dist/response/ExternalTokenResponse.d.ts.map +1 -1
- package/dist/response/ResponseHandler.d.ts +16 -16
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/response/ServerAuthorizationTokenResponse.d.ts +1 -1
- package/dist/response/ServerAuthorizationTokenResponse.d.ts.map +1 -1
- package/dist/telemetry/performance/IPerformanceClient.d.ts +2 -2
- package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.d.ts +5 -5
- package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.d.ts +3 -3
- package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.d.ts +5 -5
- package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
- package/dist/url/UrlString.d.ts +1 -1
- package/dist/url/UrlString.d.ts.map +1 -1
- package/dist/url/UrlString.mjs +1 -1
- package/dist/utils/ClientAssertionUtils.d.ts +1 -1
- package/dist/utils/ClientAssertionUtils.d.ts.map +1 -1
- package/dist/utils/ClientAssertionUtils.mjs +1 -1
- package/dist/utils/Constants.mjs +1 -1
- package/dist/utils/FunctionWrappers.d.ts +2 -2
- package/dist/utils/FunctionWrappers.d.ts.map +1 -1
- package/dist/utils/FunctionWrappers.mjs +1 -1
- package/dist/utils/ProtocolUtils.d.ts +1 -1
- package/dist/utils/ProtocolUtils.d.ts.map +1 -1
- package/dist/utils/ProtocolUtils.mjs +1 -1
- package/dist/utils/StringUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/UrlUtils.d.ts +1 -1
- package/dist/utils/UrlUtils.d.ts.map +1 -1
- package/dist/utils/UrlUtils.mjs +1 -1
- package/lib/index-browser.cjs +838 -0
- package/lib/index-browser.cjs.map +1 -0
- package/{dist/index.cjs → lib/index-node-aee3f7b6.js} +39 -765
- package/lib/index-node-aee3f7b6.js.map +1 -0
- package/lib/index-node.cjs +103 -0
- package/lib/index-node.cjs.map +1 -0
- package/lib/index.cjs +111 -0
- package/lib/index.cjs.map +1 -0
- package/lib/package.json +1 -0
- package/lib/types/account/AccountInfo.d.ts +67 -0
- package/lib/types/account/AccountInfo.d.ts.map +1 -0
- package/lib/types/account/AuthToken.d.ts +18 -0
- package/lib/types/account/AuthToken.d.ts.map +1 -0
- package/lib/types/account/CcsCredential.d.ts +10 -0
- package/lib/types/account/CcsCredential.d.ts.map +1 -0
- package/lib/types/account/ClientCredentials.d.ts +20 -0
- package/lib/types/account/ClientCredentials.d.ts.map +1 -0
- package/lib/types/account/ClientInfo.d.ts +19 -0
- package/lib/types/account/ClientInfo.d.ts.map +1 -0
- package/lib/types/account/TokenClaims.d.ts +84 -0
- package/lib/types/account/TokenClaims.d.ts.map +1 -0
- package/lib/types/authority/Authority.d.ts +255 -0
- package/lib/types/authority/Authority.d.ts.map +1 -0
- package/lib/types/authority/AuthorityFactory.d.ts +19 -0
- package/lib/types/authority/AuthorityFactory.d.ts.map +1 -0
- package/lib/types/authority/AuthorityMetadata.d.ts +44 -0
- package/lib/types/authority/AuthorityMetadata.d.ts.map +1 -0
- package/lib/types/authority/AuthorityOptions.d.ts +28 -0
- package/lib/types/authority/AuthorityOptions.d.ts.map +1 -0
- package/lib/types/authority/AuthorityType.d.ts +11 -0
- package/lib/types/authority/AuthorityType.d.ts.map +1 -0
- package/lib/types/authority/AzureRegion.d.ts +2 -0
- package/lib/types/authority/AzureRegion.d.ts.map +1 -0
- package/lib/types/authority/AzureRegionConfiguration.d.ts +6 -0
- package/lib/types/authority/AzureRegionConfiguration.d.ts.map +1 -0
- package/lib/types/authority/CloudDiscoveryMetadata.d.ts +6 -0
- package/lib/types/authority/CloudDiscoveryMetadata.d.ts.map +1 -0
- package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts +14 -0
- package/lib/types/authority/CloudInstanceDiscoveryErrorResponse.d.ts.map +1 -0
- package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts +10 -0
- package/lib/types/authority/CloudInstanceDiscoveryResponse.d.ts.map +1 -0
- package/lib/types/authority/ImdsOptions.d.ts +6 -0
- package/lib/types/authority/ImdsOptions.d.ts.map +1 -0
- package/lib/types/authority/OIDCOptions.d.ts +9 -0
- package/lib/types/authority/OIDCOptions.d.ts.map +1 -0
- package/lib/types/authority/OpenIdConfigResponse.d.ts +12 -0
- package/lib/types/authority/OpenIdConfigResponse.d.ts.map +1 -0
- package/lib/types/authority/ProtocolMode.d.ts +9 -0
- package/lib/types/authority/ProtocolMode.d.ts.map +1 -0
- package/lib/types/authority/RegionDiscovery.d.ts +33 -0
- package/lib/types/authority/RegionDiscovery.d.ts.map +1 -0
- package/lib/types/authority/RegionDiscoveryMetadata.d.ts +7 -0
- package/lib/types/authority/RegionDiscoveryMetadata.d.ts.map +1 -0
- package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts +16 -0
- package/lib/types/broker/nativeBroker/INativeBrokerPlugin.d.ts.map +1 -0
- package/lib/types/cache/CacheManager.d.ts +498 -0
- package/lib/types/cache/CacheManager.d.ts.map +1 -0
- package/lib/types/cache/entities/AccessTokenEntity.d.ts +26 -0
- package/lib/types/cache/entities/AccessTokenEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/AccountEntity.d.ts +107 -0
- package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/AppMetadataEntity.d.ts +12 -0
- package/lib/types/cache/entities/AppMetadataEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts +16 -0
- package/lib/types/cache/entities/AuthorityMetadataEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/CacheRecord.d.ts +14 -0
- package/lib/types/cache/entities/CacheRecord.d.ts.map +1 -0
- package/lib/types/cache/entities/CredentialEntity.d.ts +31 -0
- package/lib/types/cache/entities/CredentialEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/IdTokenEntity.d.ts +9 -0
- package/lib/types/cache/entities/IdTokenEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/RefreshTokenEntity.d.ts +8 -0
- package/lib/types/cache/entities/RefreshTokenEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/ServerTelemetryEntity.d.ts +7 -0
- package/lib/types/cache/entities/ServerTelemetryEntity.d.ts.map +1 -0
- package/lib/types/cache/entities/ThrottlingEntity.d.ts +8 -0
- package/lib/types/cache/entities/ThrottlingEntity.d.ts.map +1 -0
- package/lib/types/cache/interface/ICacheManager.d.ts +167 -0
- package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -0
- package/lib/types/cache/interface/ICachePlugin.d.ts +6 -0
- package/lib/types/cache/interface/ICachePlugin.d.ts.map +1 -0
- package/lib/types/cache/interface/ISerializableTokenCache.d.ts +5 -0
- package/lib/types/cache/interface/ISerializableTokenCache.d.ts.map +1 -0
- package/lib/types/cache/persistence/TokenCacheContext.d.ts +24 -0
- package/lib/types/cache/persistence/TokenCacheContext.d.ts.map +1 -0
- package/lib/types/cache/utils/CacheHelpers.d.ts +95 -0
- package/lib/types/cache/utils/CacheHelpers.d.ts.map +1 -0
- package/lib/types/cache/utils/CacheTypes.d.ts +70 -0
- package/lib/types/cache/utils/CacheTypes.d.ts.map +1 -0
- package/lib/types/client/AuthorizationCodeClient.d.ts +76 -0
- package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -0
- package/lib/types/client/BaseClient.d.ts +52 -0
- package/lib/types/client/BaseClient.d.ts.map +1 -0
- package/lib/types/client/RefreshTokenClient.d.ts +36 -0
- package/lib/types/client/RefreshTokenClient.d.ts.map +1 -0
- package/lib/types/client/SilentFlowClient.d.ts +28 -0
- package/lib/types/client/SilentFlowClient.d.ts.map +1 -0
- package/lib/types/config/AppTokenProvider.d.ts +39 -0
- package/lib/types/config/AppTokenProvider.d.ts.map +1 -0
- package/lib/types/config/ClientConfiguration.d.ts +153 -0
- package/lib/types/config/ClientConfiguration.d.ts.map +1 -0
- package/lib/types/constants/AADServerParamKeys.d.ts +54 -0
- package/lib/types/constants/AADServerParamKeys.d.ts.map +1 -0
- package/lib/types/crypto/ICrypto.d.ts +69 -0
- package/lib/types/crypto/ICrypto.d.ts.map +1 -0
- package/lib/types/crypto/IGuidGenerator.d.ts +5 -0
- package/lib/types/crypto/IGuidGenerator.d.ts.map +1 -0
- package/lib/types/crypto/JoseHeader.d.ts +23 -0
- package/lib/types/crypto/JoseHeader.d.ts.map +1 -0
- package/lib/types/crypto/PopTokenGenerator.d.ts +60 -0
- package/lib/types/crypto/PopTokenGenerator.d.ts.map +1 -0
- package/lib/types/crypto/SignedHttpRequest.d.ts +16 -0
- package/lib/types/crypto/SignedHttpRequest.d.ts.map +1 -0
- package/lib/types/error/AuthError.d.ts +45 -0
- package/lib/types/error/AuthError.d.ts.map +1 -0
- package/lib/types/error/AuthErrorCodes.d.ts +6 -0
- package/lib/types/error/AuthErrorCodes.d.ts.map +1 -0
- package/lib/types/error/CacheError.d.ts +21 -0
- package/lib/types/error/CacheError.d.ts.map +1 -0
- package/lib/types/error/CacheErrorCodes.d.ts +3 -0
- package/lib/types/error/CacheErrorCodes.d.ts.map +1 -0
- package/lib/types/error/ClientAuthError.d.ts +238 -0
- package/lib/types/error/ClientAuthError.d.ts.map +1 -0
- package/lib/types/error/ClientAuthErrorCodes.d.ts +45 -0
- package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -0
- package/lib/types/error/ClientConfigurationError.d.ts +129 -0
- package/lib/types/error/ClientConfigurationError.d.ts.map +1 -0
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts +23 -0
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
- package/lib/types/error/InteractionRequiredAuthError.d.ts +66 -0
- package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -0
- package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts +8 -0
- package/lib/types/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
- package/lib/types/error/JoseHeaderError.d.ts +16 -0
- package/lib/types/error/JoseHeaderError.d.ts.map +1 -0
- package/lib/types/error/JoseHeaderErrorCodes.d.ts +3 -0
- package/lib/types/error/JoseHeaderErrorCodes.d.ts.map +1 -0
- package/lib/types/error/ServerError.d.ts +16 -0
- package/lib/types/error/ServerError.d.ts.map +1 -0
- package/lib/types/exports-browser-only.d.ts +10 -0
- package/lib/types/exports-browser-only.d.ts.map +1 -0
- package/lib/types/exports-common.d.ts +80 -0
- package/lib/types/exports-common.d.ts.map +1 -0
- package/lib/types/exports-node-only.d.ts +18 -0
- package/lib/types/exports-node-only.d.ts.map +1 -0
- package/lib/types/index-browser.d.ts +7 -0
- package/lib/types/index-browser.d.ts.map +1 -0
- package/lib/types/index-node.d.ts +7 -0
- package/lib/types/index-node.d.ts.map +1 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/logger/Logger.d.ts +96 -0
- package/lib/types/logger/Logger.d.ts.map +1 -0
- package/lib/types/network/INetworkModule.d.ts +30 -0
- package/lib/types/network/INetworkModule.d.ts.map +1 -0
- package/lib/types/network/NetworkManager.d.ts +34 -0
- package/lib/types/network/NetworkManager.d.ts.map +1 -0
- package/lib/types/network/RequestThumbprint.d.ts +19 -0
- package/lib/types/network/RequestThumbprint.d.ts.map +1 -0
- package/lib/types/network/ThrottlingUtils.d.ts +43 -0
- package/lib/types/network/ThrottlingUtils.d.ts.map +1 -0
- package/lib/types/packageMetadata.d.ts +3 -0
- package/lib/types/packageMetadata.d.ts.map +1 -0
- package/lib/types/request/AuthenticationHeaderParser.d.ts +20 -0
- package/lib/types/request/AuthenticationHeaderParser.d.ts.map +1 -0
- package/lib/types/request/BaseAuthRequest.d.ts +48 -0
- package/lib/types/request/BaseAuthRequest.d.ts.map +1 -0
- package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +28 -0
- package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -0
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +51 -0
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -0
- package/lib/types/request/CommonClientCredentialRequest.d.ts +18 -0
- package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -0
- package/lib/types/request/CommonDeviceCodeRequest.d.ts +22 -0
- package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -0
- package/lib/types/request/CommonEndSessionRequest.d.ts +22 -0
- package/lib/types/request/CommonEndSessionRequest.d.ts.map +1 -0
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts +14 -0
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -0
- package/lib/types/request/CommonRefreshTokenRequest.d.ts +23 -0
- package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -0
- package/lib/types/request/CommonSilentFlowRequest.d.ts +28 -0
- package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -0
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts +18 -0
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -0
- package/lib/types/request/NativeRequest.d.ts +20 -0
- package/lib/types/request/NativeRequest.d.ts.map +1 -0
- package/lib/types/request/NativeSignOutRequest.d.ts +6 -0
- package/lib/types/request/NativeSignOutRequest.d.ts.map +1 -0
- package/lib/types/request/RequestParameterBuilder.d.ts +218 -0
- package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -0
- package/lib/types/request/RequestValidator.d.ts +28 -0
- package/lib/types/request/RequestValidator.d.ts.map +1 -0
- package/lib/types/request/ScopeSet.d.ts +89 -0
- package/lib/types/request/ScopeSet.d.ts.map +1 -0
- package/lib/types/request/StoreInCache.d.ts +9 -0
- package/lib/types/request/StoreInCache.d.ts.map +1 -0
- package/lib/types/response/AuthenticationResult.d.ts +42 -0
- package/lib/types/response/AuthenticationResult.d.ts.map +1 -0
- package/lib/types/response/AuthorizationCodePayload.d.ts +14 -0
- package/lib/types/response/AuthorizationCodePayload.d.ts.map +1 -0
- package/lib/types/response/DeviceCodeResponse.d.ts +26 -0
- package/lib/types/response/DeviceCodeResponse.d.ts.map +1 -0
- package/lib/types/response/ExternalTokenResponse.d.ts +16 -0
- package/lib/types/response/ExternalTokenResponse.d.ts.map +1 -0
- package/lib/types/response/IMDSBadResponse.d.ts +5 -0
- package/lib/types/response/IMDSBadResponse.d.ts.map +1 -0
- package/lib/types/response/ResponseHandler.d.ts +70 -0
- package/lib/types/response/ResponseHandler.d.ts.map +1 -0
- package/lib/types/response/ServerAuthorizationCodeResponse.d.ts +27 -0
- package/lib/types/response/ServerAuthorizationCodeResponse.d.ts.map +1 -0
- package/lib/types/response/ServerAuthorizationTokenResponse.d.ts +48 -0
- package/lib/types/response/ServerAuthorizationTokenResponse.d.ts.map +1 -0
- package/lib/types/telemetry/performance/IPerformanceClient.d.ts +58 -0
- package/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +1 -0
- package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts +6 -0
- package/lib/types/telemetry/performance/IPerformanceMeasurement.d.ts.map +1 -0
- package/lib/types/telemetry/performance/PerformanceClient.d.ts +243 -0
- package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -0
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts +512 -0
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -0
- package/lib/types/telemetry/performance/StubPerformanceClient.d.ts +25 -0
- package/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +1 -0
- package/lib/types/telemetry/server/ServerTelemetryManager.d.ts +79 -0
- package/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +1 -0
- package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts +9 -0
- package/lib/types/telemetry/server/ServerTelemetryRequest.d.ts.map +1 -0
- package/lib/types/url/IUri.d.ts +13 -0
- package/lib/types/url/IUri.d.ts.map +1 -0
- package/lib/types/url/UrlString.d.ts +49 -0
- package/lib/types/url/UrlString.d.ts.map +1 -0
- package/lib/types/utils/ClientAssertionUtils.d.ts +3 -0
- package/lib/types/utils/ClientAssertionUtils.d.ts.map +1 -0
- package/lib/types/utils/Constants.d.ts +310 -0
- package/lib/types/utils/Constants.d.ts.map +1 -0
- package/lib/types/utils/FunctionWrappers.d.ts +28 -0
- package/lib/types/utils/FunctionWrappers.d.ts.map +1 -0
- package/lib/types/utils/MsalTypes.d.ts +7 -0
- package/lib/types/utils/MsalTypes.d.ts.map +1 -0
- package/lib/types/utils/ProtocolUtils.d.ts +43 -0
- package/lib/types/utils/ProtocolUtils.d.ts.map +1 -0
- package/lib/types/utils/StringUtils.d.ts +41 -0
- package/lib/types/utils/StringUtils.d.ts.map +1 -0
- package/lib/types/utils/TimeUtils.d.ts +26 -0
- package/lib/types/utils/TimeUtils.d.ts.map +1 -0
- package/lib/types/utils/UrlUtils.d.ts +11 -0
- package/lib/types/utils/UrlUtils.d.ts.map +1 -0
- package/node/README.md +1 -0
- package/node/package.json +5 -0
- package/package.json +37 -8
- package/src/account/AccountInfo.ts +1 -1
- package/src/account/AuthToken.ts +2 -2
- package/src/account/ClientInfo.ts +2 -2
- package/src/authority/Authority.ts +26 -26
- package/src/authority/AuthorityFactory.ts +9 -9
- package/src/authority/AuthorityMetadata.ts +7 -7
- package/src/authority/AuthorityOptions.ts +4 -4
- package/src/authority/AzureRegionConfiguration.ts +1 -1
- package/src/authority/CloudInstanceDiscoveryResponse.ts +1 -1
- package/src/authority/OIDCOptions.ts +1 -1
- package/src/authority/RegionDiscovery.ts +10 -10
- package/src/authority/RegionDiscoveryMetadata.ts +1 -1
- package/src/broker/nativeBroker/INativeBrokerPlugin.ts +5 -5
- package/src/cache/CacheManager.ts +28 -28
- package/src/cache/entities/AccessTokenEntity.ts +2 -2
- package/src/cache/entities/AccountEntity.ts +10 -10
- package/src/cache/entities/CacheRecord.ts +5 -5
- package/src/cache/entities/CredentialEntity.ts +1 -1
- package/src/cache/entities/IdTokenEntity.ts +1 -1
- package/src/cache/entities/RefreshTokenEntity.ts +1 -1
- package/src/cache/interface/ICacheManager.ts +12 -12
- package/src/cache/interface/ICachePlugin.ts +1 -1
- package/src/cache/persistence/TokenCacheContext.ts +1 -1
- package/src/cache/utils/CacheHelpers.ts +13 -13
- package/src/cache/utils/CacheTypes.ts +11 -11
- package/src/client/AuthorizationCodeClient.ts +51 -38
- package/src/client/BaseClient.ts +19 -19
- package/src/client/RefreshTokenClient.ts +29 -29
- package/src/client/SilentFlowClient.ts +17 -17
- package/src/config/ClientConfiguration.ts +18 -15
- package/src/crypto/ICrypto.ts +3 -3
- package/src/crypto/JoseHeader.ts +2 -2
- package/src/crypto/PopTokenGenerator.ts +7 -7
- package/src/crypto/SignedHttpRequest.ts +1 -1
- package/src/error/AuthError.ts +2 -2
- package/src/error/CacheError.ts +1 -1
- package/src/error/ClientAuthError.ts +2 -2
- package/src/error/ClientConfigurationError.ts +2 -2
- package/src/error/InteractionRequiredAuthError.ts +3 -3
- package/src/error/JoseHeaderError.ts +2 -2
- package/src/error/ServerError.ts +1 -1
- package/src/exports-browser-only.ts +29 -0
- package/src/exports-common.ts +192 -0
- package/src/exports-node-only.ts +35 -0
- package/src/index-browser.ts +11 -0
- package/src/index-node.ts +11 -0
- package/src/index.ts +7 -250
- package/src/logger/Logger.ts +2 -2
- package/src/network/INetworkModule.ts +2 -2
- package/src/network/NetworkManager.ts +7 -7
- package/src/network/RequestThumbprint.ts +2 -2
- package/src/network/ThrottlingUtils.ts +8 -8
- package/src/packageMetadata.ts +1 -1
- package/src/request/AuthenticationHeaderParser.ts +2 -2
- package/src/request/BaseAuthRequest.ts +5 -5
- package/src/request/CommonAuthorizationCodeRequest.ts +3 -3
- package/src/request/CommonAuthorizationUrlRequest.ts +4 -4
- package/src/request/CommonClientCredentialRequest.ts +3 -3
- package/src/request/CommonDeviceCodeRequest.ts +3 -3
- package/src/request/CommonEndSessionRequest.ts +2 -2
- package/src/request/CommonOnBehalfOfRequest.ts +1 -1
- package/src/request/CommonRefreshTokenRequest.ts +3 -3
- package/src/request/CommonSilentFlowRequest.ts +3 -3
- package/src/request/CommonUsernamePasswordRequest.ts +1 -1
- package/src/request/NativeRequest.ts +1 -1
- package/src/request/RequestParameterBuilder.ts +9 -9
- package/src/request/RequestValidator.ts +2 -2
- package/src/request/ScopeSet.ts +4 -4
- package/src/response/AuthenticationResult.ts +1 -1
- package/src/response/ExternalTokenResponse.ts +1 -1
- package/src/response/ResponseHandler.ts +31 -31
- package/src/response/ServerAuthorizationTokenResponse.ts +1 -1
- package/src/telemetry/performance/IPerformanceClient.ts +2 -2
- package/src/telemetry/performance/PerformanceClient.ts +10 -10
- package/src/telemetry/performance/StubPerformanceClient.ts +6 -3
- package/src/telemetry/server/ServerTelemetryManager.ts +6 -6
- package/src/url/UrlString.ts +5 -5
- package/src/utils/ClientAssertionUtils.ts +1 -1
- package/src/utils/FunctionWrappers.ts +2 -2
- package/src/utils/ProtocolUtils.ts +3 -3
- package/src/utils/UrlUtils.ts +2 -2
- package/dist/index.cjs.map +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IUri } from "./IUri.js";
|
|
2
|
+
/**
|
|
3
|
+
* Url object class which can perform various transformations on url strings.
|
|
4
|
+
*/
|
|
5
|
+
export declare class UrlString {
|
|
6
|
+
private _urlString;
|
|
7
|
+
get urlString(): string;
|
|
8
|
+
constructor(url: string);
|
|
9
|
+
/**
|
|
10
|
+
* Ensure urls are lower case and end with a / character.
|
|
11
|
+
* @param url
|
|
12
|
+
*/
|
|
13
|
+
static canonicalizeUri(url: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Throws if urlString passed is not a valid authority URI string.
|
|
16
|
+
*/
|
|
17
|
+
validateAsUri(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Given a url and a query string return the url with provided query string appended
|
|
20
|
+
* @param url
|
|
21
|
+
* @param queryString
|
|
22
|
+
*/
|
|
23
|
+
static appendQueryString(url: string, queryString: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a url with the hash removed
|
|
26
|
+
* @param url
|
|
27
|
+
*/
|
|
28
|
+
static removeHashFromUrl(url: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Given a url like https://a:b/common/d?e=f#g, and a tenantId, returns https://a:b/tenantId/d
|
|
31
|
+
* @param href The url
|
|
32
|
+
* @param tenantId The tenant id to replace
|
|
33
|
+
*/
|
|
34
|
+
replaceTenantPath(tenantId: string): UrlString;
|
|
35
|
+
/**
|
|
36
|
+
* Parses out the components from a url string.
|
|
37
|
+
* @returns An object with the various components. Please cache this value insted of calling this multiple times on the same url.
|
|
38
|
+
*/
|
|
39
|
+
getUrlComponents(): IUri;
|
|
40
|
+
static getDomainFromUrl(url: string): string;
|
|
41
|
+
static getAbsoluteUrl(relativeUrl: string, baseUrl: string): string;
|
|
42
|
+
static constructAuthorityUriFromObject(urlObject: IUri): UrlString;
|
|
43
|
+
/**
|
|
44
|
+
* Check if the hash of the URL string contains known properties
|
|
45
|
+
* @deprecated This API will be removed in a future version
|
|
46
|
+
*/
|
|
47
|
+
static hashContainsKnownProperties(response: string): boolean;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=UrlString.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UrlString.d.ts","sourceRoot":"","sources":["../../../src/url/UrlString.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC;;GAEG;AACH,qBAAa,SAAS;IAElB,OAAO,CAAC,UAAU,CAAS;IAC3B,IAAW,SAAS,IAAI,MAAM,CAE7B;gBAEW,GAAG,EAAE,MAAM;IAcvB;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAoB3C;;OAEG;IACH,aAAa,IAAI,IAAI;IA6BrB;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM;IAUlE;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI7C;;;;OAIG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAc9C;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAsCxB,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAc5C,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAgBnE,MAAM,CAAC,+BAA+B,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS;IAUlE;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAGhE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ClientAssertionCallback } from "../account/ClientCredentials.js";
|
|
2
|
+
export declare function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise<string>;
|
|
3
|
+
//# sourceMappingURL=ClientAssertionUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientAssertionUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ClientAssertionUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EAE1B,MAAM,iCAAiC,CAAC;AAEzC,wBAAsB,kBAAkB,CACpC,eAAe,EAAE,MAAM,GAAG,uBAAuB,EACjD,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC,CAUjB"}
|
|
@@ -0,0 +1,310 @@
|
|
|
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
|
+
NOT_AVAILABLE: string;
|
|
32
|
+
FORWARD_SLASH: string;
|
|
33
|
+
IMDS_ENDPOINT: string;
|
|
34
|
+
IMDS_VERSION: string;
|
|
35
|
+
IMDS_TIMEOUT: number;
|
|
36
|
+
AZURE_REGION_AUTO_DISCOVER_FLAG: string;
|
|
37
|
+
REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: 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 HttpStatus: {
|
|
45
|
+
readonly SUCCESS: 200;
|
|
46
|
+
readonly SUCCESS_RANGE_START: 200;
|
|
47
|
+
readonly SUCCESS_RANGE_END: 299;
|
|
48
|
+
readonly REDIRECT: 302;
|
|
49
|
+
readonly CLIENT_ERROR: 400;
|
|
50
|
+
readonly CLIENT_ERROR_RANGE_START: 400;
|
|
51
|
+
readonly BAD_REQUEST: 400;
|
|
52
|
+
readonly UNAUTHORIZED: 401;
|
|
53
|
+
readonly NOT_FOUND: 404;
|
|
54
|
+
readonly REQUEST_TIMEOUT: 408;
|
|
55
|
+
readonly TOO_MANY_REQUESTS: 429;
|
|
56
|
+
readonly CLIENT_ERROR_RANGE_END: 499;
|
|
57
|
+
readonly SERVER_ERROR: 500;
|
|
58
|
+
readonly SERVER_ERROR_RANGE_START: 500;
|
|
59
|
+
readonly SERVICE_UNAVAILABLE: 503;
|
|
60
|
+
readonly GATEWAY_TIMEOUT: 504;
|
|
61
|
+
readonly SERVER_ERROR_RANGE_END: 599;
|
|
62
|
+
readonly MULTI_SIDED_ERROR: 600;
|
|
63
|
+
};
|
|
64
|
+
export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus];
|
|
65
|
+
export declare const OIDC_DEFAULT_SCOPES: string[];
|
|
66
|
+
export declare const OIDC_SCOPES: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Request header names
|
|
69
|
+
*/
|
|
70
|
+
export declare const HeaderNames: {
|
|
71
|
+
readonly CONTENT_TYPE: "Content-Type";
|
|
72
|
+
readonly RETRY_AFTER: "Retry-After";
|
|
73
|
+
readonly CCS_HEADER: "X-AnchorMailbox";
|
|
74
|
+
readonly WWWAuthenticate: "WWW-Authenticate";
|
|
75
|
+
readonly AuthenticationInfo: "Authentication-Info";
|
|
76
|
+
readonly X_MS_REQUEST_ID: "x-ms-request-id";
|
|
77
|
+
readonly X_MS_HTTP_VERSION: "x-ms-httpver";
|
|
78
|
+
};
|
|
79
|
+
export type HeaderNames = (typeof HeaderNames)[keyof typeof HeaderNames];
|
|
80
|
+
/**
|
|
81
|
+
* Persistent cache keys MSAL which stay while user is logged in.
|
|
82
|
+
*/
|
|
83
|
+
export declare const PersistentCacheKeys: {
|
|
84
|
+
readonly ID_TOKEN: "idtoken";
|
|
85
|
+
readonly CLIENT_INFO: "client.info";
|
|
86
|
+
readonly ADAL_ID_TOKEN: "adal.idtoken";
|
|
87
|
+
readonly ERROR: "error";
|
|
88
|
+
readonly ERROR_DESC: "error.description";
|
|
89
|
+
readonly ACTIVE_ACCOUNT: "active-account";
|
|
90
|
+
readonly ACTIVE_ACCOUNT_FILTERS: "active-account-filters";
|
|
91
|
+
};
|
|
92
|
+
export type PersistentCacheKeys = (typeof PersistentCacheKeys)[keyof typeof PersistentCacheKeys];
|
|
93
|
+
/**
|
|
94
|
+
* String constants related to AAD Authority
|
|
95
|
+
*/
|
|
96
|
+
export declare const AADAuthorityConstants: {
|
|
97
|
+
readonly COMMON: "common";
|
|
98
|
+
readonly ORGANIZATIONS: "organizations";
|
|
99
|
+
readonly CONSUMERS: "consumers";
|
|
100
|
+
};
|
|
101
|
+
export type AADAuthorityConstants = (typeof AADAuthorityConstants)[keyof typeof AADAuthorityConstants];
|
|
102
|
+
/**
|
|
103
|
+
* Claims request keys
|
|
104
|
+
*/
|
|
105
|
+
export declare const ClaimsRequestKeys: {
|
|
106
|
+
readonly ACCESS_TOKEN: "access_token";
|
|
107
|
+
readonly XMS_CC: "xms_cc";
|
|
108
|
+
};
|
|
109
|
+
export type ClaimsRequestKeys = (typeof ClaimsRequestKeys)[keyof typeof ClaimsRequestKeys];
|
|
110
|
+
/**
|
|
111
|
+
* we considered making this "enum" in the request instead of string, however it looks like the allowed list of
|
|
112
|
+
* prompt values kept changing over past couple of years. There are some undocumented prompt values for some
|
|
113
|
+
* internal partners too, hence the choice of generic "string" type instead of the "enum"
|
|
114
|
+
*/
|
|
115
|
+
export declare const PromptValue: {
|
|
116
|
+
LOGIN: string;
|
|
117
|
+
SELECT_ACCOUNT: string;
|
|
118
|
+
CONSENT: string;
|
|
119
|
+
NONE: string;
|
|
120
|
+
CREATE: string;
|
|
121
|
+
NO_SESSION: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* allowed values for codeVerifier
|
|
125
|
+
*/
|
|
126
|
+
export declare const CodeChallengeMethodValues: {
|
|
127
|
+
PLAIN: string;
|
|
128
|
+
S256: string;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* allowed values for server response type
|
|
132
|
+
*/
|
|
133
|
+
export declare const ServerResponseType: {
|
|
134
|
+
readonly QUERY: "query";
|
|
135
|
+
readonly FRAGMENT: "fragment";
|
|
136
|
+
};
|
|
137
|
+
export type ServerResponseType = (typeof ServerResponseType)[keyof typeof ServerResponseType];
|
|
138
|
+
/**
|
|
139
|
+
* allowed values for response_mode
|
|
140
|
+
*/
|
|
141
|
+
export declare const ResponseMode: {
|
|
142
|
+
readonly FORM_POST: "form_post";
|
|
143
|
+
readonly QUERY: "query";
|
|
144
|
+
readonly FRAGMENT: "fragment";
|
|
145
|
+
};
|
|
146
|
+
export type ResponseMode = (typeof ResponseMode)[keyof typeof ResponseMode];
|
|
147
|
+
/**
|
|
148
|
+
* allowed grant_type
|
|
149
|
+
*/
|
|
150
|
+
export declare const GrantType: {
|
|
151
|
+
readonly IMPLICIT_GRANT: "implicit";
|
|
152
|
+
readonly AUTHORIZATION_CODE_GRANT: "authorization_code";
|
|
153
|
+
readonly CLIENT_CREDENTIALS_GRANT: "client_credentials";
|
|
154
|
+
readonly RESOURCE_OWNER_PASSWORD_GRANT: "password";
|
|
155
|
+
readonly REFRESH_TOKEN_GRANT: "refresh_token";
|
|
156
|
+
readonly DEVICE_CODE_GRANT: "device_code";
|
|
157
|
+
readonly JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
|
158
|
+
};
|
|
159
|
+
export type GrantType = (typeof GrantType)[keyof typeof GrantType];
|
|
160
|
+
/**
|
|
161
|
+
* Account types in Cache
|
|
162
|
+
*/
|
|
163
|
+
export declare const CacheAccountType: {
|
|
164
|
+
readonly MSSTS_ACCOUNT_TYPE: "MSSTS";
|
|
165
|
+
readonly ADFS_ACCOUNT_TYPE: "ADFS";
|
|
166
|
+
readonly MSAV1_ACCOUNT_TYPE: "MSA";
|
|
167
|
+
readonly GENERIC_ACCOUNT_TYPE: "Generic";
|
|
168
|
+
};
|
|
169
|
+
export type CacheAccountType = (typeof CacheAccountType)[keyof typeof CacheAccountType];
|
|
170
|
+
/**
|
|
171
|
+
* Separators used in cache
|
|
172
|
+
*/
|
|
173
|
+
export declare const Separators: {
|
|
174
|
+
readonly CACHE_KEY_SEPARATOR: "-";
|
|
175
|
+
readonly CLIENT_INFO_SEPARATOR: ".";
|
|
176
|
+
};
|
|
177
|
+
export type Separators = (typeof Separators)[keyof typeof Separators];
|
|
178
|
+
/**
|
|
179
|
+
* Credential Type stored in the cache
|
|
180
|
+
*/
|
|
181
|
+
export declare const CredentialType: {
|
|
182
|
+
readonly ID_TOKEN: "IdToken";
|
|
183
|
+
readonly ACCESS_TOKEN: "AccessToken";
|
|
184
|
+
readonly ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme";
|
|
185
|
+
readonly REFRESH_TOKEN: "RefreshToken";
|
|
186
|
+
};
|
|
187
|
+
export type CredentialType = (typeof CredentialType)[keyof typeof CredentialType];
|
|
188
|
+
/**
|
|
189
|
+
* Combine all cache types
|
|
190
|
+
*/
|
|
191
|
+
export declare const CacheType: {
|
|
192
|
+
readonly ADFS: 1001;
|
|
193
|
+
readonly MSA: 1002;
|
|
194
|
+
readonly MSSTS: 1003;
|
|
195
|
+
readonly GENERIC: 1004;
|
|
196
|
+
readonly ACCESS_TOKEN: 2001;
|
|
197
|
+
readonly REFRESH_TOKEN: 2002;
|
|
198
|
+
readonly ID_TOKEN: 2003;
|
|
199
|
+
readonly APP_METADATA: 3001;
|
|
200
|
+
readonly UNDEFINED: 9999;
|
|
201
|
+
};
|
|
202
|
+
export type CacheType = (typeof CacheType)[keyof typeof CacheType];
|
|
203
|
+
/**
|
|
204
|
+
* More Cache related constants
|
|
205
|
+
*/
|
|
206
|
+
export declare const APP_METADATA = "appmetadata";
|
|
207
|
+
export declare const CLIENT_INFO = "client_info";
|
|
208
|
+
export declare const THE_FAMILY_ID = "1";
|
|
209
|
+
export declare const AUTHORITY_METADATA_CONSTANTS: {
|
|
210
|
+
CACHE_KEY: string;
|
|
211
|
+
REFRESH_TIME_SECONDS: number;
|
|
212
|
+
};
|
|
213
|
+
export declare const AuthorityMetadataSource: {
|
|
214
|
+
readonly CONFIG: "config";
|
|
215
|
+
readonly CACHE: "cache";
|
|
216
|
+
readonly NETWORK: "network";
|
|
217
|
+
readonly HARDCODED_VALUES: "hardcoded_values";
|
|
218
|
+
};
|
|
219
|
+
export type AuthorityMetadataSource = (typeof AuthorityMetadataSource)[keyof typeof AuthorityMetadataSource];
|
|
220
|
+
export declare const SERVER_TELEM_CONSTANTS: {
|
|
221
|
+
SCHEMA_VERSION: number;
|
|
222
|
+
MAX_CUR_HEADER_BYTES: number;
|
|
223
|
+
MAX_LAST_HEADER_BYTES: number;
|
|
224
|
+
MAX_CACHED_ERRORS: number;
|
|
225
|
+
CACHE_KEY: string;
|
|
226
|
+
CATEGORY_SEPARATOR: string;
|
|
227
|
+
VALUE_SEPARATOR: string;
|
|
228
|
+
OVERFLOW_TRUE: string;
|
|
229
|
+
OVERFLOW_FALSE: string;
|
|
230
|
+
UNKNOWN_ERROR: string;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Type of the authentication request
|
|
234
|
+
*/
|
|
235
|
+
export declare const AuthenticationScheme: {
|
|
236
|
+
readonly BEARER: "Bearer";
|
|
237
|
+
readonly POP: "pop";
|
|
238
|
+
readonly SSH: "ssh-cert";
|
|
239
|
+
};
|
|
240
|
+
export type AuthenticationScheme = (typeof AuthenticationScheme)[keyof typeof AuthenticationScheme];
|
|
241
|
+
/**
|
|
242
|
+
* Constants related to throttling
|
|
243
|
+
*/
|
|
244
|
+
export declare const ThrottlingConstants: {
|
|
245
|
+
DEFAULT_THROTTLE_TIME_SECONDS: number;
|
|
246
|
+
DEFAULT_MAX_THROTTLE_TIME_SECONDS: number;
|
|
247
|
+
THROTTLING_PREFIX: string;
|
|
248
|
+
X_MS_LIB_CAPABILITY_VALUE: string;
|
|
249
|
+
};
|
|
250
|
+
export declare const Errors: {
|
|
251
|
+
INVALID_GRANT_ERROR: string;
|
|
252
|
+
CLIENT_MISMATCH_ERROR: string;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Password grant parameters
|
|
256
|
+
*/
|
|
257
|
+
export declare const PasswordGrantConstants: {
|
|
258
|
+
readonly username: "username";
|
|
259
|
+
readonly password: "password";
|
|
260
|
+
};
|
|
261
|
+
export type PasswordGrantConstants = (typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants];
|
|
262
|
+
/**
|
|
263
|
+
* Response codes
|
|
264
|
+
*/
|
|
265
|
+
export declare const ResponseCodes: {
|
|
266
|
+
readonly httpSuccess: 200;
|
|
267
|
+
readonly httpBadRequest: 400;
|
|
268
|
+
};
|
|
269
|
+
export type ResponseCodes = (typeof ResponseCodes)[keyof typeof ResponseCodes];
|
|
270
|
+
/**
|
|
271
|
+
* Region Discovery Sources
|
|
272
|
+
*/
|
|
273
|
+
export declare const RegionDiscoverySources: {
|
|
274
|
+
readonly FAILED_AUTO_DETECTION: "1";
|
|
275
|
+
readonly INTERNAL_CACHE: "2";
|
|
276
|
+
readonly ENVIRONMENT_VARIABLE: "3";
|
|
277
|
+
readonly IMDS: "4";
|
|
278
|
+
};
|
|
279
|
+
export type RegionDiscoverySources = (typeof RegionDiscoverySources)[keyof typeof RegionDiscoverySources];
|
|
280
|
+
/**
|
|
281
|
+
* Region Discovery Outcomes
|
|
282
|
+
*/
|
|
283
|
+
export declare const RegionDiscoveryOutcomes: {
|
|
284
|
+
readonly CONFIGURED_MATCHES_DETECTED: "1";
|
|
285
|
+
readonly CONFIGURED_NO_AUTO_DETECTION: "2";
|
|
286
|
+
readonly CONFIGURED_NOT_DETECTED: "3";
|
|
287
|
+
readonly AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4";
|
|
288
|
+
readonly AUTO_DETECTION_REQUESTED_FAILED: "5";
|
|
289
|
+
};
|
|
290
|
+
export type RegionDiscoveryOutcomes = (typeof RegionDiscoveryOutcomes)[keyof typeof RegionDiscoveryOutcomes];
|
|
291
|
+
/**
|
|
292
|
+
* Specifies the reason for fetching the access token from the identity provider
|
|
293
|
+
*/
|
|
294
|
+
export declare const CacheOutcome: {
|
|
295
|
+
readonly NOT_APPLICABLE: "0";
|
|
296
|
+
readonly FORCE_REFRESH_OR_CLAIMS: "1";
|
|
297
|
+
readonly NO_CACHED_ACCESS_TOKEN: "2";
|
|
298
|
+
readonly CACHED_ACCESS_TOKEN_EXPIRED: "3";
|
|
299
|
+
readonly PROACTIVELY_REFRESHED: "4";
|
|
300
|
+
};
|
|
301
|
+
export type CacheOutcome = (typeof CacheOutcome)[keyof typeof CacheOutcome];
|
|
302
|
+
export declare const JsonWebTokenTypes: {
|
|
303
|
+
readonly Jwt: "JWT";
|
|
304
|
+
readonly Jwk: "JWK";
|
|
305
|
+
readonly Pop: "pop";
|
|
306
|
+
};
|
|
307
|
+
export type JsonWebTokenTypes = (typeof JsonWebTokenTypes)[keyof typeof JsonWebTokenTypes];
|
|
308
|
+
export declare const ONE_DAY_IN_MS = 86400000;
|
|
309
|
+
export declare const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
310
|
+
//# sourceMappingURL=Constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/utils/Constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;CAmBb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,UAI/B,CAAC;AAEF,eAAO,MAAM,WAAW,UAAkD,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;CAQtB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC7B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAC1B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,YAAY;;;;CAGf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;CAQZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AACX,MAAM,MAAM,gBAAgB,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,UAAU;;;CAGb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AACX,MAAM,MAAM,cAAc,GACtB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;CAUZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAC1C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,eAAO,MAAM,4BAA4B;;;CAGxC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;CAK1B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAC/B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAE3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAWlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAC5B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;CAS/B,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAGlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;CAGzB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAC9B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAC9B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;CAM1B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAC/B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;CAWf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE5E,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE/D,eAAO,MAAM,aAAa,WAAW,CAAC;AAGtC,eAAO,MAAM,gCAAgC,MAAM,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Logger } from "../logger/Logger.js";
|
|
2
|
+
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient.js";
|
|
3
|
+
/**
|
|
4
|
+
* Wraps a function with a performance measurement.
|
|
5
|
+
* Usage: invoke(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction)
|
|
6
|
+
* @param callback
|
|
7
|
+
* @param eventName
|
|
8
|
+
* @param logger
|
|
9
|
+
* @param telemetryClient
|
|
10
|
+
* @param correlationId
|
|
11
|
+
* @returns
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const invoke: <T extends any[], U>(callback: (...args: T) => U, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => U;
|
|
15
|
+
/**
|
|
16
|
+
* Wraps an async function with a performance measurement.
|
|
17
|
+
* Usage: invokeAsync(functionToCall, performanceClient, "EventName", "correlationId")(...argsToPassToFunction)
|
|
18
|
+
* @param callback
|
|
19
|
+
* @param eventName
|
|
20
|
+
* @param logger
|
|
21
|
+
* @param telemetryClient
|
|
22
|
+
* @param correlationId
|
|
23
|
+
* @returns
|
|
24
|
+
* @internal
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
export declare const invokeAsync: <T extends any[], U>(callback: (...args: T) => Promise<U>, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => Promise<U>;
|
|
28
|
+
//# sourceMappingURL=FunctionWrappers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunctionWrappers.d.ts","sourceRoot":"","sources":["../../../src/utils/FunctionWrappers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,+DAEJ,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,sBAuCzB,CAAC;AAEF;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,wEAET,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,+BAyCzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MsalTypes.d.ts","sourceRoot":"","sources":["../../../src/utils/MsalTypes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ICrypto } from "../crypto/ICrypto.js";
|
|
2
|
+
/**
|
|
3
|
+
* Type which defines the object that is stringified, encoded and sent in the state value.
|
|
4
|
+
* Contains the following:
|
|
5
|
+
* - id - unique identifier for this request
|
|
6
|
+
* - ts - timestamp for the time the request was made. Used to ensure that token expiration is not calculated incorrectly.
|
|
7
|
+
* - platformState - string value sent from the platform.
|
|
8
|
+
*/
|
|
9
|
+
export type LibraryStateObject = {
|
|
10
|
+
id: string;
|
|
11
|
+
meta?: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Type which defines the stringified and encoded object sent to the service in the authorize request.
|
|
15
|
+
*/
|
|
16
|
+
export type RequestStateObject = {
|
|
17
|
+
userRequestState: string;
|
|
18
|
+
libraryState: LibraryStateObject;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Class which provides helpers for OAuth 2.0 protocol specific values
|
|
22
|
+
*/
|
|
23
|
+
export declare class ProtocolUtils {
|
|
24
|
+
/**
|
|
25
|
+
* Appends user state with random guid, or returns random guid.
|
|
26
|
+
* @param userState
|
|
27
|
+
* @param randomGuid
|
|
28
|
+
*/
|
|
29
|
+
static setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record<string, string>): string;
|
|
30
|
+
/**
|
|
31
|
+
* Generates the state value used by the common library.
|
|
32
|
+
* @param randomGuid
|
|
33
|
+
* @param cryptoObj
|
|
34
|
+
*/
|
|
35
|
+
static generateLibraryState(cryptoObj: ICrypto, meta?: Record<string, string>): string;
|
|
36
|
+
/**
|
|
37
|
+
* Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
|
|
38
|
+
* @param state
|
|
39
|
+
* @param cryptoObj
|
|
40
|
+
*/
|
|
41
|
+
static parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=ProtocolUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProtocolUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/ProtocolUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAM/C;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,kBAAkB,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACtB;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,OAAO,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAUT;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CACvB,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAmBT;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CACpB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,MAAM,GACd,kBAAkB;CA6BxB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hidden
|
|
3
|
+
*/
|
|
4
|
+
export declare class StringUtils {
|
|
5
|
+
/**
|
|
6
|
+
* Check if stringified object is empty
|
|
7
|
+
* @param strObj
|
|
8
|
+
*/
|
|
9
|
+
static isEmptyObj(strObj?: string): boolean;
|
|
10
|
+
static startsWith(str: string, search: string): boolean;
|
|
11
|
+
static endsWith(str: string, search: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Parses string into an object.
|
|
14
|
+
*
|
|
15
|
+
* @param query
|
|
16
|
+
*/
|
|
17
|
+
static queryStringToObject<T>(query: string): T;
|
|
18
|
+
/**
|
|
19
|
+
* Trims entries in an array.
|
|
20
|
+
*
|
|
21
|
+
* @param arr
|
|
22
|
+
*/
|
|
23
|
+
static trimArrayEntries(arr: Array<string>): Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Removes empty strings from array
|
|
26
|
+
* @param arr
|
|
27
|
+
*/
|
|
28
|
+
static removeEmptyStringsFromArray(arr: Array<string>): Array<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Attempts to parse a string into JSON
|
|
31
|
+
* @param str
|
|
32
|
+
*/
|
|
33
|
+
static jsonParseHelper<T>(str: string): T | null;
|
|
34
|
+
/**
|
|
35
|
+
* Tests if a given string matches a given pattern, with support for wildcards and queries.
|
|
36
|
+
* @param pattern Wildcard pattern to string match. Supports "*" for wildcards and "?" for queries
|
|
37
|
+
* @param input String to match against
|
|
38
|
+
*/
|
|
39
|
+
static matchPattern(pattern: string, input: string): boolean;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=StringUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/StringUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,WAAW;IACpB;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO;IAU3C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAIvD,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAOrD;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;IAe/C;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAI1D;;;OAGG;IACH,MAAM,CAAC,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAMrE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAQhD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAe/D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for managing date and time operations.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* return the current time in Unix time (seconds).
|
|
6
|
+
*/
|
|
7
|
+
export declare function nowSeconds(): number;
|
|
8
|
+
/**
|
|
9
|
+
* check if a token is expired based on given UTC time in seconds.
|
|
10
|
+
* @param expiresOn
|
|
11
|
+
*/
|
|
12
|
+
export declare function isTokenExpired(expiresOn: string, offset: number): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If the current time is earlier than the time that a token was cached at, we must discard the token
|
|
15
|
+
* i.e. The system clock was turned back after acquiring the cached token
|
|
16
|
+
* @param cachedAt
|
|
17
|
+
* @param offset
|
|
18
|
+
*/
|
|
19
|
+
export declare function wasClockTurnedBack(cachedAt: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Waits for t number of milliseconds
|
|
22
|
+
* @param t number
|
|
23
|
+
* @param value T
|
|
24
|
+
*/
|
|
25
|
+
export declare function delay<T>(t: number, value?: T): Promise<T | void>;
|
|
26
|
+
//# sourceMappingURL=TimeUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/TimeUtils.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAGnC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAOzE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAEhE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ServerAuthorizationCodeResponse } from "../response/ServerAuthorizationCodeResponse.js";
|
|
2
|
+
/**
|
|
3
|
+
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
|
4
|
+
* @param hashString
|
|
5
|
+
*/
|
|
6
|
+
export declare function stripLeadingHashOrQuery(responseString: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Returns URL hash as server auth code response object.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getDeserializedResponse(responseString: string): ServerAuthorizationCodeResponse | null;
|
|
11
|
+
//# sourceMappingURL=UrlUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UrlUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/UrlUtils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AAMjG;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAWtE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,cAAc,EAAE,MAAM,GACvB,+BAA+B,GAAG,IAAI,CA0BxC"}
|
package/node/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Do not remove or rename. This folder allows subpath imports in environments that don't understand the exports field.
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/AzureAD/microsoft-authentication-library-for-js.git"
|
|
12
12
|
},
|
|
13
|
-
"version": "14.
|
|
13
|
+
"version": "14.15.0",
|
|
14
14
|
"description": "Microsoft Authentication Library for js",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"implicit",
|
|
@@ -22,16 +22,40 @@
|
|
|
22
22
|
"oauth"
|
|
23
23
|
],
|
|
24
24
|
"sideEffects": false,
|
|
25
|
-
"
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./lib/index.cjs",
|
|
26
27
|
"module": "./dist/index.mjs",
|
|
27
28
|
"types": "./dist/index.d.ts",
|
|
28
29
|
"exports": {
|
|
30
|
+
"./browser": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/index-browser.d.ts",
|
|
33
|
+
"default": "./dist/index-browser.mjs"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./lib/types/index-browser.d.ts",
|
|
37
|
+
"default": "./lib/index-browser.cjs"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"./node": {
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/index-node.d.ts",
|
|
43
|
+
"default": "./dist/index-node.mjs"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./lib/types/index-node.d.ts",
|
|
47
|
+
"default": "./lib/index-node.cjs"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
29
50
|
".": {
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
51
|
+
"import": {
|
|
52
|
+
"types": "./dist/index.d.ts",
|
|
53
|
+
"default": "./dist/index.mjs"
|
|
54
|
+
},
|
|
55
|
+
"require": {
|
|
56
|
+
"types": "./lib/types/index.d.ts",
|
|
57
|
+
"default": "./lib/index.cjs"
|
|
58
|
+
}
|
|
35
59
|
},
|
|
36
60
|
"./package.json": "./package.json"
|
|
37
61
|
},
|
|
@@ -43,7 +67,10 @@
|
|
|
43
67
|
},
|
|
44
68
|
"files": [
|
|
45
69
|
"dist",
|
|
46
|
-
"
|
|
70
|
+
"lib",
|
|
71
|
+
"src",
|
|
72
|
+
"node",
|
|
73
|
+
"browser"
|
|
47
74
|
],
|
|
48
75
|
"scripts": {
|
|
49
76
|
"clean": "shx rm -rf dist lib",
|
|
@@ -88,9 +115,11 @@
|
|
|
88
115
|
"prettier": "2.8.7",
|
|
89
116
|
"rimraf": "^3.0.2",
|
|
90
117
|
"rollup": "^3.14.0",
|
|
118
|
+
"rollup-msal": "file:../../shared-configs/rollup-msal",
|
|
91
119
|
"shx": "^0.3.2",
|
|
92
120
|
"sinon": "^7.5.0",
|
|
93
121
|
"ts-jest": "^29.1.0",
|
|
122
|
+
"ts-jest-resolver": "^2.0.1",
|
|
94
123
|
"ts-node": "^10.9.1",
|
|
95
124
|
"tslib": "^1.10.0",
|
|
96
125
|
"typescript": "^4.9.5",
|