@azure/msal-common 15.13.3 → 16.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/AccountInfo.d.ts +0 -1
- package/dist/account/AccountInfo.d.ts.map +1 -1
- package/dist/account/AccountInfo.mjs +1 -1
- package/dist/account/AccountInfo.mjs.map +1 -1
- package/dist/account/AuthToken.d.ts.map +1 -1
- package/dist/account/AuthToken.mjs +2 -3
- package/dist/account/AuthToken.mjs.map +1 -1
- package/dist/account/CcsCredential.mjs +1 -1
- package/dist/account/ClientInfo.d.ts.map +1 -1
- package/dist/account/ClientInfo.mjs +4 -6
- package/dist/account/ClientInfo.mjs.map +1 -1
- package/dist/account/TokenClaims.mjs +1 -1
- package/dist/authority/Authority.d.ts +2 -2
- package/dist/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.mjs +89 -105
- package/dist/authority/Authority.mjs.map +1 -1
- package/dist/authority/AuthorityFactory.d.ts +6 -2
- package/dist/authority/AuthorityFactory.d.ts.map +1 -1
- package/dist/authority/AuthorityFactory.mjs +8 -5
- package/dist/authority/AuthorityFactory.mjs.map +1 -1
- package/dist/authority/AuthorityMetadata.d.ts +2 -2
- package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
- package/dist/authority/AuthorityMetadata.mjs +34 -31
- package/dist/authority/AuthorityMetadata.mjs.map +1 -1
- package/dist/authority/AuthorityOptions.d.ts +0 -1
- package/dist/authority/AuthorityOptions.d.ts.map +1 -1
- package/dist/authority/AuthorityOptions.mjs +1 -1
- package/dist/authority/AuthorityOptions.mjs.map +1 -1
- package/dist/authority/AuthorityType.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
- package/dist/authority/OIDCOptions.d.ts +2 -2
- 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 +3 -3
- package/dist/authority/RegionDiscovery.d.ts.map +1 -1
- package/dist/authority/RegionDiscovery.mjs +14 -15
- package/dist/authority/RegionDiscovery.mjs.map +1 -1
- package/dist/cache/CacheManager.d.ts +26 -19
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.mjs +70 -83
- package/dist/cache/CacheManager.mjs.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts +0 -4
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccountEntity.d.ts +4 -56
- package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts +0 -2
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/dist/cache/interface/ICacheManager.d.ts +35 -17
- package/dist/cache/interface/ICacheManager.d.ts.map +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/AccountEntityUtils.d.ts +53 -0
- package/dist/cache/utils/AccountEntityUtils.d.ts.map +1 -0
- package/dist/cache/utils/AccountEntityUtils.mjs +192 -0
- package/dist/cache/utils/AccountEntityUtils.mjs.map +1 -0
- package/dist/cache/utils/CacheHelpers.d.ts +2 -2
- package/dist/cache/utils/CacheHelpers.d.ts.map +1 -1
- package/dist/cache/utils/CacheHelpers.mjs +10 -13
- package/dist/cache/utils/CacheHelpers.mjs.map +1 -1
- package/dist/cache/utils/CacheTypes.d.ts +0 -1
- package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts +23 -4
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +63 -35
- package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
- package/dist/client/RefreshTokenClient.d.ts +17 -4
- package/dist/client/RefreshTokenClient.d.ts.map +1 -1
- package/dist/client/RefreshTokenClient.mjs +51 -37
- package/dist/client/RefreshTokenClient.mjs.map +1 -1
- package/dist/client/SilentFlowClient.d.ts +17 -4
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.mjs +28 -15
- package/dist/client/SilentFlowClient.mjs.map +1 -1
- package/dist/config/ClientConfiguration.d.ts +2 -22
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.mjs +9 -15
- package/dist/config/ClientConfiguration.mjs.map +1 -1
- package/dist/constants/AADServerParamKeys.mjs +1 -1
- package/dist/crypto/ICrypto.d.ts +5 -3
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.mjs +1 -1
- package/dist/crypto/ICrypto.mjs.map +1 -1
- package/dist/crypto/JoseHeader.mjs +1 -1
- package/dist/crypto/PopTokenGenerator.d.ts +2 -2
- package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
- package/dist/crypto/PopTokenGenerator.mjs +3 -5
- package/dist/crypto/PopTokenGenerator.mjs.map +1 -1
- package/dist/error/AuthError.d.ts +1 -18
- package/dist/error/AuthError.d.ts.map +1 -1
- package/dist/error/AuthError.mjs +12 -34
- package/dist/error/AuthError.mjs.map +1 -1
- package/dist/error/AuthErrorCodes.mjs +1 -1
- package/dist/error/CacheError.d.ts +1 -6
- package/dist/error/CacheError.d.ts.map +1 -1
- package/dist/error/CacheError.mjs +6 -13
- package/dist/error/CacheError.mjs.map +1 -1
- package/dist/error/CacheErrorCodes.mjs +1 -1
- package/dist/error/ClientAuthError.d.ts +0 -229
- package/dist/error/ClientAuthError.d.ts.map +1 -1
- package/dist/error/ClientAuthError.mjs +3 -240
- package/dist/error/ClientAuthError.mjs.map +1 -1
- package/dist/error/ClientAuthErrorCodes.d.ts +0 -8
- package/dist/error/ClientAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +2 -10
- package/dist/error/ClientAuthErrorCodes.mjs.map +1 -1
- package/dist/error/ClientConfigurationError.d.ts +0 -128
- package/dist/error/ClientConfigurationError.d.ts.map +1 -1
- package/dist/error/ClientConfigurationError.mjs +3 -134
- package/dist/error/ClientConfigurationError.mjs.map +1 -1
- package/dist/error/ClientConfigurationErrorCodes.d.ts +0 -2
- package/dist/error/ClientConfigurationErrorCodes.d.ts.map +1 -1
- package/dist/error/ClientConfigurationErrorCodes.mjs +3 -5
- package/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthError.d.ts +1 -19
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +10 -35
- package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
- package/dist/error/JoseHeaderError.d.ts +0 -4
- package/dist/error/JoseHeaderError.d.ts.map +1 -1
- package/dist/error/JoseHeaderError.mjs +3 -8
- package/dist/error/JoseHeaderError.mjs.map +1 -1
- package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
- package/dist/error/NetworkError.mjs +1 -1
- package/dist/error/PlatformBrokerError.d.ts.map +1 -1
- package/dist/error/PlatformBrokerError.mjs +3 -2
- package/dist/error/PlatformBrokerError.mjs.map +1 -1
- package/dist/error/ServerError.mjs +1 -1
- package/dist/exports-browser-only.d.ts +4 -3
- package/dist/exports-browser-only.d.ts.map +1 -1
- package/dist/exports-common.d.ts +11 -8
- package/dist/exports-common.d.ts.map +1 -1
- package/dist/exports-node-only.d.ts +2 -4
- package/dist/exports-node-only.d.ts.map +1 -1
- package/dist/index-node.mjs +15 -10
- package/dist/index-node.mjs.map +1 -1
- package/dist/index.mjs +17 -11
- package/dist/index.mjs.map +1 -1
- package/dist/logger/Logger.d.ts +36 -13
- package/dist/logger/Logger.d.ts.map +1 -1
- package/dist/logger/Logger.mjs +105 -22
- package/dist/logger/Logger.mjs.map +1 -1
- package/dist/network/INetworkModule.mjs +1 -1
- package/dist/network/RequestThumbprint.mjs +2 -2
- package/dist/network/RequestThumbprint.mjs.map +1 -1
- package/dist/network/ThrottlingUtils.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.mjs +6 -7
- package/dist/network/ThrottlingUtils.mjs.map +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.d.ts.map +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts +1 -2
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +14 -14
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/protocol/Token.d.ts +40 -0
- package/dist/protocol/Token.d.ts.map +1 -0
- package/dist/protocol/Token.mjs +129 -0
- package/dist/protocol/Token.mjs.map +1 -0
- package/dist/request/AuthenticationHeaderParser.d.ts.map +1 -1
- package/dist/request/AuthenticationHeaderParser.mjs +3 -3
- package/dist/request/AuthenticationHeaderParser.mjs.map +1 -1
- package/dist/request/BaseAuthRequest.d.ts +4 -8
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationCodeRequest.d.ts +2 -1
- package/dist/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/CommonAuthorizationUrlRequest.d.ts +2 -4
- package/dist/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/CommonRefreshTokenRequest.d.ts +2 -1
- package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/CommonSilentFlowRequest.d.ts +2 -1
- package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts +6 -12
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.mjs +11 -24
- package/dist/request/RequestParameterBuilder.mjs.map +1 -1
- package/dist/request/ScopeSet.mjs +5 -5
- package/dist/request/ScopeSet.mjs.map +1 -1
- package/dist/response/AuthenticationResult.d.ts +1 -1
- package/dist/response/AuthenticationResult.d.ts.map +1 -1
- package/dist/response/ResponseHandler.d.ts +7 -6
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +41 -43
- package/dist/response/ResponseHandler.mjs.map +1 -1
- package/dist/telemetry/performance/IPerformanceClient.d.ts +0 -29
- package/dist/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.d.ts +5 -81
- package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.mjs +24 -170
- package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.d.ts +1 -280
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +2 -483
- package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceEvents.d.ts +66 -0
- package/dist/telemetry/performance/PerformanceEvents.d.ts.map +1 -0
- package/dist/telemetry/performance/PerformanceEvents.mjs +74 -0
- package/dist/telemetry/performance/PerformanceEvents.mjs.map +1 -0
- package/dist/telemetry/performance/StubPerformanceClient.d.ts +0 -4
- package/dist/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs +2 -26
- package/dist/telemetry/performance/StubPerformanceClient.mjs.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.d.ts +2 -2
- package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.mjs +28 -30
- package/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
- package/dist/url/UrlString.d.ts +0 -5
- package/dist/url/UrlString.d.ts.map +1 -1
- package/dist/url/UrlString.mjs +5 -13
- package/dist/url/UrlString.mjs.map +1 -1
- package/dist/utils/ClientAssertionUtils.mjs +1 -1
- package/dist/utils/Constants.d.ts +81 -112
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +100 -127
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/FunctionWrappers.d.ts +2 -2
- package/dist/utils/FunctionWrappers.d.ts.map +1 -1
- package/dist/utils/FunctionWrappers.mjs +19 -20
- package/dist/utils/FunctionWrappers.mjs.map +1 -1
- package/dist/utils/ProtocolUtils.d.ts +14 -35
- package/dist/utils/ProtocolUtils.d.ts.map +1 -1
- package/dist/utils/ProtocolUtils.mjs +57 -61
- package/dist/utils/ProtocolUtils.mjs.map +1 -1
- package/dist/utils/StateTypes.d.ts +15 -0
- package/dist/utils/StateTypes.d.ts.map +1 -0
- package/dist/utils/StringUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/UrlUtils.d.ts +1 -2
- package/dist/utils/UrlUtils.d.ts.map +1 -1
- package/dist/utils/UrlUtils.mjs +3 -10
- package/dist/utils/UrlUtils.mjs.map +1 -1
- package/lib/index-browser.cjs +26 -206
- package/lib/index-browser.cjs.map +1 -1
- package/lib/{index-node-4Jss3kYh.js → index-node-B7mR4APO.js} +3494 -4270
- package/lib/index-node-B7mR4APO.js.map +1 -0
- package/lib/index-node.cjs +6 -34
- package/lib/index-node.cjs.map +1 -1
- package/lib/index.cjs +5 -34
- package/lib/index.cjs.map +1 -1
- package/lib/types/account/AccountInfo.d.ts +0 -1
- package/lib/types/account/AccountInfo.d.ts.map +1 -1
- package/lib/types/account/AuthToken.d.ts.map +1 -1
- package/lib/types/account/ClientInfo.d.ts.map +1 -1
- package/lib/types/authority/Authority.d.ts +2 -2
- package/lib/types/authority/Authority.d.ts.map +1 -1
- package/lib/types/authority/AuthorityFactory.d.ts +6 -2
- package/lib/types/authority/AuthorityFactory.d.ts.map +1 -1
- package/lib/types/authority/AuthorityMetadata.d.ts +2 -2
- package/lib/types/authority/AuthorityMetadata.d.ts.map +1 -1
- package/lib/types/authority/AuthorityOptions.d.ts +0 -1
- package/lib/types/authority/AuthorityOptions.d.ts.map +1 -1
- package/lib/types/authority/OIDCOptions.d.ts +2 -2
- package/lib/types/authority/OIDCOptions.d.ts.map +1 -1
- package/lib/types/authority/RegionDiscovery.d.ts +3 -3
- package/lib/types/authority/RegionDiscovery.d.ts.map +1 -1
- package/lib/types/cache/CacheManager.d.ts +26 -19
- package/lib/types/cache/CacheManager.d.ts.map +1 -1
- package/lib/types/cache/entities/AccessTokenEntity.d.ts +0 -4
- package/lib/types/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/lib/types/cache/entities/AccountEntity.d.ts +4 -56
- package/lib/types/cache/entities/AccountEntity.d.ts.map +1 -1
- package/lib/types/cache/entities/CredentialEntity.d.ts +0 -2
- package/lib/types/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/lib/types/cache/interface/ICacheManager.d.ts +35 -17
- package/lib/types/cache/interface/ICacheManager.d.ts.map +1 -1
- package/lib/types/cache/utils/AccountEntityUtils.d.ts +53 -0
- package/lib/types/cache/utils/AccountEntityUtils.d.ts.map +1 -0
- package/lib/types/cache/utils/CacheHelpers.d.ts +2 -2
- package/lib/types/cache/utils/CacheHelpers.d.ts.map +1 -1
- package/lib/types/cache/utils/CacheTypes.d.ts +0 -1
- package/lib/types/cache/utils/CacheTypes.d.ts.map +1 -1
- package/lib/types/client/AuthorizationCodeClient.d.ts +23 -4
- package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/lib/types/client/RefreshTokenClient.d.ts +17 -4
- package/lib/types/client/RefreshTokenClient.d.ts.map +1 -1
- package/lib/types/client/SilentFlowClient.d.ts +17 -4
- package/lib/types/client/SilentFlowClient.d.ts.map +1 -1
- package/lib/types/config/ClientConfiguration.d.ts +2 -22
- package/lib/types/config/ClientConfiguration.d.ts.map +1 -1
- package/lib/types/crypto/ICrypto.d.ts +5 -3
- package/lib/types/crypto/ICrypto.d.ts.map +1 -1
- package/lib/types/crypto/PopTokenGenerator.d.ts +2 -2
- package/lib/types/crypto/PopTokenGenerator.d.ts.map +1 -1
- package/lib/types/error/AuthError.d.ts +1 -18
- package/lib/types/error/AuthError.d.ts.map +1 -1
- package/lib/types/error/CacheError.d.ts +1 -6
- package/lib/types/error/CacheError.d.ts.map +1 -1
- package/lib/types/error/ClientAuthError.d.ts +0 -229
- package/lib/types/error/ClientAuthError.d.ts.map +1 -1
- package/lib/types/error/ClientAuthErrorCodes.d.ts +0 -8
- package/lib/types/error/ClientAuthErrorCodes.d.ts.map +1 -1
- package/lib/types/error/ClientConfigurationError.d.ts +0 -128
- package/lib/types/error/ClientConfigurationError.d.ts.map +1 -1
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts +0 -2
- package/lib/types/error/ClientConfigurationErrorCodes.d.ts.map +1 -1
- package/lib/types/error/InteractionRequiredAuthError.d.ts +1 -19
- package/lib/types/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/lib/types/error/JoseHeaderError.d.ts +0 -4
- package/lib/types/error/JoseHeaderError.d.ts.map +1 -1
- package/lib/types/error/PlatformBrokerError.d.ts.map +1 -1
- package/lib/types/exports-browser-only.d.ts +4 -3
- package/lib/types/exports-browser-only.d.ts.map +1 -1
- package/lib/types/exports-common.d.ts +11 -8
- package/lib/types/exports-common.d.ts.map +1 -1
- package/lib/types/exports-node-only.d.ts +2 -4
- package/lib/types/exports-node-only.d.ts.map +1 -1
- package/lib/types/logger/Logger.d.ts +36 -13
- package/lib/types/logger/Logger.d.ts.map +1 -1
- package/lib/types/network/ThrottlingUtils.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/packageMetadata.d.ts.map +1 -1
- package/lib/types/protocol/Authorize.d.ts +1 -2
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/protocol/Token.d.ts +40 -0
- package/lib/types/protocol/Token.d.ts.map +1 -0
- package/lib/types/request/AuthenticationHeaderParser.d.ts.map +1 -1
- package/lib/types/request/BaseAuthRequest.d.ts +4 -8
- package/lib/types/request/BaseAuthRequest.d.ts.map +1 -1
- package/lib/types/request/CommonAuthorizationCodeRequest.d.ts +2 -1
- package/lib/types/request/CommonAuthorizationCodeRequest.d.ts.map +1 -1
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts +2 -4
- package/lib/types/request/CommonAuthorizationUrlRequest.d.ts.map +1 -1
- package/lib/types/request/CommonRefreshTokenRequest.d.ts +2 -1
- package/lib/types/request/CommonRefreshTokenRequest.d.ts.map +1 -1
- package/lib/types/request/CommonSilentFlowRequest.d.ts +2 -1
- package/lib/types/request/CommonSilentFlowRequest.d.ts.map +1 -1
- package/lib/types/request/RequestParameterBuilder.d.ts +6 -12
- package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -1
- package/lib/types/response/AuthenticationResult.d.ts +1 -1
- package/lib/types/response/AuthenticationResult.d.ts.map +1 -1
- package/lib/types/response/ResponseHandler.d.ts +7 -6
- package/lib/types/response/ResponseHandler.d.ts.map +1 -1
- package/lib/types/telemetry/performance/IPerformanceClient.d.ts +0 -29
- package/lib/types/telemetry/performance/IPerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceClient.d.ts +5 -81
- package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts +1 -280
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceEvents.d.ts +66 -0
- package/lib/types/telemetry/performance/PerformanceEvents.d.ts.map +1 -0
- package/lib/types/telemetry/performance/StubPerformanceClient.d.ts +0 -4
- package/lib/types/telemetry/performance/StubPerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/server/ServerTelemetryManager.d.ts +2 -2
- package/lib/types/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
- package/lib/types/url/UrlString.d.ts +0 -5
- package/lib/types/url/UrlString.d.ts.map +1 -1
- package/lib/types/utils/Constants.d.ts +81 -112
- package/lib/types/utils/Constants.d.ts.map +1 -1
- package/lib/types/utils/FunctionWrappers.d.ts +2 -2
- package/lib/types/utils/FunctionWrappers.d.ts.map +1 -1
- package/lib/types/utils/ProtocolUtils.d.ts +14 -35
- package/lib/types/utils/ProtocolUtils.d.ts.map +1 -1
- package/lib/types/utils/StateTypes.d.ts +15 -0
- package/lib/types/utils/StateTypes.d.ts.map +1 -0
- package/lib/types/utils/UrlUtils.d.ts +1 -2
- package/lib/types/utils/UrlUtils.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/account/AccountInfo.ts +0 -1
- package/src/account/AuthToken.ts +1 -2
- package/src/account/ClientInfo.ts +3 -6
- package/src/authority/Authority.ts +145 -146
- package/src/authority/AuthorityFactory.ts +7 -7
- package/src/authority/AuthorityMetadata.ts +54 -47
- package/src/authority/AuthorityOptions.ts +0 -1
- package/src/authority/OIDCOptions.ts +2 -2
- package/src/authority/RegionDiscovery.ts +20 -33
- package/src/cache/CacheManager.ts +177 -128
- package/src/cache/entities/AccessTokenEntity.ts +0 -4
- package/src/cache/entities/AccountEntity.ts +4 -292
- package/src/cache/entities/CredentialEntity.ts +0 -2
- package/src/cache/interface/ICacheManager.ts +55 -20
- package/src/cache/utils/AccountEntityUtils.ts +258 -0
- package/src/cache/utils/CacheHelpers.ts +23 -37
- package/src/cache/utils/CacheTypes.ts +0 -1
- package/src/client/AuthorizationCodeClient.ts +146 -58
- package/src/client/RefreshTokenClient.ts +108 -65
- package/src/client/SilentFlowClient.ts +74 -25
- package/src/config/ClientConfiguration.ts +9 -37
- package/src/crypto/ICrypto.ts +5 -3
- package/src/crypto/PopTokenGenerator.ts +3 -13
- package/src/error/AuthError.ts +11 -30
- package/src/error/CacheError.ts +4 -15
- package/src/error/ClientAuthError.ts +1 -317
- package/src/error/ClientAuthErrorCodes.ts +0 -8
- package/src/error/ClientConfigurationError.ts +1 -202
- package/src/error/ClientConfigurationErrorCodes.ts +0 -4
- package/src/error/InteractionRequiredAuthError.ts +8 -48
- package/src/error/JoseHeaderError.ts +1 -8
- package/src/error/PlatformBrokerError.ts +2 -1
- package/src/exports-browser-only.ts +2 -6
- package/src/exports-common.ts +8 -40
- package/src/exports-node-only.ts +5 -4
- package/src/logger/Logger.ts +174 -39
- package/src/network/RequestThumbprint.ts +1 -1
- package/src/network/ThrottlingUtils.ts +12 -15
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +24 -20
- package/src/protocol/Token.ts +230 -0
- package/src/request/AuthenticationHeaderParser.ts +2 -4
- package/src/request/BaseAuthRequest.ts +4 -8
- package/src/request/CommonAuthorizationCodeRequest.ts +2 -1
- package/src/request/CommonAuthorizationUrlRequest.ts +2 -4
- package/src/request/CommonRefreshTokenRequest.ts +2 -1
- package/src/request/CommonSilentFlowRequest.ts +2 -1
- package/src/request/RequestParameterBuilder.ts +35 -50
- package/src/request/ScopeSet.ts +4 -4
- package/src/response/AuthenticationResult.ts +1 -1
- package/src/response/ResponseHandler.ts +56 -60
- package/src/telemetry/performance/IPerformanceClient.ts +0 -40
- package/src/telemetry/performance/PerformanceClient.ts +26 -295
- package/src/telemetry/performance/PerformanceEvent.ts +3 -582
- package/src/telemetry/performance/PerformanceEvents.ts +98 -0
- package/src/telemetry/performance/StubPerformanceClient.ts +0 -16
- package/src/telemetry/server/ServerTelemetryManager.ts +33 -44
- package/src/url/UrlString.ts +3 -12
- package/src/utils/Constants.ts +103 -140
- package/src/utils/FunctionWrappers.ts +28 -29
- package/src/utils/ProtocolUtils.ts +67 -93
- package/src/utils/StateTypes.ts +20 -0
- package/src/utils/UrlUtils.ts +2 -15
- package/dist/cache/entities/AccountEntity.mjs +0 -232
- package/dist/cache/entities/AccountEntity.mjs.map +0 -1
- package/dist/client/BaseClient.d.ts +0 -59
- package/dist/client/BaseClient.d.ts.map +0 -1
- package/dist/client/BaseClient.mjs +0 -167
- package/dist/client/BaseClient.mjs.map +0 -1
- package/dist/index-browser.mjs +0 -72
- package/dist/index-browser.mjs.map +0 -1
- package/dist/request/CommonClientCredentialRequest.d.ts +0 -18
- package/dist/request/CommonClientCredentialRequest.d.ts.map +0 -1
- package/dist/request/CommonDeviceCodeRequest.d.ts +0 -22
- package/dist/request/CommonDeviceCodeRequest.d.ts.map +0 -1
- package/dist/request/CommonOnBehalfOfRequest.d.ts +0 -14
- package/dist/request/CommonOnBehalfOfRequest.d.ts.map +0 -1
- package/dist/request/CommonUsernamePasswordRequest.d.ts +0 -18
- package/dist/request/CommonUsernamePasswordRequest.d.ts.map +0 -1
- package/lib/index-node-4Jss3kYh.js.map +0 -1
- package/lib/types/client/BaseClient.d.ts +0 -59
- package/lib/types/client/BaseClient.d.ts.map +0 -1
- package/lib/types/request/CommonClientCredentialRequest.d.ts +0 -18
- package/lib/types/request/CommonClientCredentialRequest.d.ts.map +0 -1
- package/lib/types/request/CommonDeviceCodeRequest.d.ts +0 -22
- package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +0 -1
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts +0 -14
- package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +0 -1
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts +0 -18
- package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +0 -1
- package/src/client/BaseClient.ts +0 -320
- package/src/request/CommonClientCredentialRequest.ts +0 -23
- package/src/request/CommonDeviceCodeRequest.ts +0 -31
- package/src/request/CommonOnBehalfOfRequest.ts +0 -19
- package/src/request/CommonUsernamePasswordRequest.ts +0 -23
|
@@ -24,8 +24,4 @@ export type AccessTokenEntity = CredentialEntity & {
|
|
|
24
24
|
refreshOn?: string;
|
|
25
25
|
/** Matches the authentication scheme for which the token was issued (i.e. Bearer or pop) */
|
|
26
26
|
tokenType?: AuthenticationScheme;
|
|
27
|
-
/** Stringified claims object */
|
|
28
|
-
requestedClaims?: string;
|
|
29
|
-
/** Matches the SHA 256 hash of the claims object included in the token request */
|
|
30
|
-
requestedClaimsHash?: string;
|
|
31
27
|
};
|
|
@@ -3,27 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import type { Authority } from "../../authority/Authority.js";
|
|
8
|
-
import { ICrypto } from "../../crypto/ICrypto.js";
|
|
9
|
-
import { ClientInfo, buildClientInfo } from "../../account/ClientInfo.js";
|
|
10
|
-
import {
|
|
11
|
-
AccountInfo,
|
|
12
|
-
TenantProfile,
|
|
13
|
-
buildTenantProfile,
|
|
14
|
-
DataBoundary,
|
|
15
|
-
} from "../../account/AccountInfo.js";
|
|
16
|
-
import {
|
|
17
|
-
createClientAuthError,
|
|
18
|
-
ClientAuthErrorCodes,
|
|
19
|
-
} from "../../error/ClientAuthError.js";
|
|
20
|
-
import { AuthorityType } from "../../authority/AuthorityType.js";
|
|
21
|
-
import { Logger } from "../../logger/Logger.js";
|
|
22
|
-
import {
|
|
23
|
-
TokenClaims,
|
|
24
|
-
getTenantIdFromIdTokenClaims,
|
|
25
|
-
} from "../../account/TokenClaims.js";
|
|
26
|
-
import { ProtocolMode } from "../../authority/ProtocolMode.js";
|
|
6
|
+
import { TenantProfile, DataBoundary } from "../../account/AccountInfo.js";
|
|
27
7
|
|
|
28
8
|
/**
|
|
29
9
|
* Type that defines required and optional parameters for an Account field (based on universal cache schema implemented by all MSALs).
|
|
@@ -48,7 +28,7 @@ import { ProtocolMode } from "../../authority/ProtocolMode.js";
|
|
|
48
28
|
* }
|
|
49
29
|
* @internal
|
|
50
30
|
*/
|
|
51
|
-
export
|
|
31
|
+
export type AccountEntity = {
|
|
52
32
|
homeAccountId: string;
|
|
53
33
|
environment: string;
|
|
54
34
|
realm: string;
|
|
@@ -64,275 +44,7 @@ export class AccountEntity {
|
|
|
64
44
|
msGraphHost?: string;
|
|
65
45
|
nativeAccountId?: string;
|
|
66
46
|
tenantProfiles?: Array<TenantProfile>;
|
|
47
|
+
/** Timestamp when the entry was last updated */
|
|
67
48
|
lastUpdatedAt: string;
|
|
68
49
|
dataBoundary?: DataBoundary;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Returns the AccountInfo interface for this account.
|
|
72
|
-
*/
|
|
73
|
-
static getAccountInfo(accountEntity: AccountEntity): AccountInfo {
|
|
74
|
-
return {
|
|
75
|
-
homeAccountId: accountEntity.homeAccountId,
|
|
76
|
-
environment: accountEntity.environment,
|
|
77
|
-
tenantId: accountEntity.realm,
|
|
78
|
-
username: accountEntity.username,
|
|
79
|
-
localAccountId: accountEntity.localAccountId,
|
|
80
|
-
loginHint: accountEntity.loginHint,
|
|
81
|
-
name: accountEntity.name,
|
|
82
|
-
nativeAccountId: accountEntity.nativeAccountId,
|
|
83
|
-
authorityType: accountEntity.authorityType,
|
|
84
|
-
// Deserialize tenant profiles array into a Map
|
|
85
|
-
tenantProfiles: new Map(
|
|
86
|
-
(accountEntity.tenantProfiles || []).map((tenantProfile) => {
|
|
87
|
-
return [tenantProfile.tenantId, tenantProfile];
|
|
88
|
-
})
|
|
89
|
-
),
|
|
90
|
-
dataBoundary: accountEntity.dataBoundary,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Returns true if the account entity is in single tenant format (outdated), false otherwise
|
|
96
|
-
*/
|
|
97
|
-
isSingleTenant(): boolean {
|
|
98
|
-
return !this.tenantProfiles;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Build Account cache from IdToken, clientInfo and authority/policy. Associated with AAD.
|
|
103
|
-
* @param accountDetails
|
|
104
|
-
*/
|
|
105
|
-
static createAccount(
|
|
106
|
-
accountDetails: {
|
|
107
|
-
homeAccountId: string;
|
|
108
|
-
idTokenClaims?: TokenClaims;
|
|
109
|
-
clientInfo?: string;
|
|
110
|
-
cloudGraphHostName?: string;
|
|
111
|
-
msGraphHost?: string;
|
|
112
|
-
environment?: string;
|
|
113
|
-
nativeAccountId?: string;
|
|
114
|
-
tenantProfiles?: Array<TenantProfile>;
|
|
115
|
-
},
|
|
116
|
-
authority: Authority,
|
|
117
|
-
base64Decode?: (input: string) => string
|
|
118
|
-
): AccountEntity {
|
|
119
|
-
const account: AccountEntity = new AccountEntity();
|
|
120
|
-
|
|
121
|
-
if (authority.authorityType === AuthorityType.Adfs) {
|
|
122
|
-
account.authorityType = CacheAccountType.ADFS_ACCOUNT_TYPE;
|
|
123
|
-
} else if (authority.protocolMode === ProtocolMode.OIDC) {
|
|
124
|
-
account.authorityType = CacheAccountType.GENERIC_ACCOUNT_TYPE;
|
|
125
|
-
} else {
|
|
126
|
-
account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
let clientInfo: ClientInfo | undefined;
|
|
130
|
-
|
|
131
|
-
if (accountDetails.clientInfo && base64Decode) {
|
|
132
|
-
clientInfo = buildClientInfo(
|
|
133
|
-
accountDetails.clientInfo,
|
|
134
|
-
base64Decode
|
|
135
|
-
);
|
|
136
|
-
if (clientInfo.xms_tdbr) {
|
|
137
|
-
account.dataBoundary =
|
|
138
|
-
clientInfo.xms_tdbr === "EU" ? "EU" : "None";
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
account.clientInfo = accountDetails.clientInfo;
|
|
143
|
-
account.homeAccountId = accountDetails.homeAccountId;
|
|
144
|
-
account.nativeAccountId = accountDetails.nativeAccountId;
|
|
145
|
-
|
|
146
|
-
const env =
|
|
147
|
-
accountDetails.environment ||
|
|
148
|
-
(authority && authority.getPreferredCache());
|
|
149
|
-
|
|
150
|
-
if (!env) {
|
|
151
|
-
throw createClientAuthError(
|
|
152
|
-
ClientAuthErrorCodes.invalidCacheEnvironment
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
account.environment = env;
|
|
157
|
-
// non AAD scenarios can have empty realm
|
|
158
|
-
account.realm =
|
|
159
|
-
clientInfo?.utid ||
|
|
160
|
-
getTenantIdFromIdTokenClaims(accountDetails.idTokenClaims) ||
|
|
161
|
-
"";
|
|
162
|
-
|
|
163
|
-
// How do you account for MSA CID here?
|
|
164
|
-
account.localAccountId =
|
|
165
|
-
clientInfo?.uid ||
|
|
166
|
-
accountDetails.idTokenClaims?.oid ||
|
|
167
|
-
accountDetails.idTokenClaims?.sub ||
|
|
168
|
-
"";
|
|
169
|
-
|
|
170
|
-
/*
|
|
171
|
-
* In B2C scenarios the emails claim is used instead of preferred_username and it is an array.
|
|
172
|
-
* In most cases it will contain a single email. This field should not be relied upon if a custom
|
|
173
|
-
* policy is configured to return more than 1 email.
|
|
174
|
-
*/
|
|
175
|
-
const preferredUsername =
|
|
176
|
-
accountDetails.idTokenClaims?.preferred_username ||
|
|
177
|
-
accountDetails.idTokenClaims?.upn;
|
|
178
|
-
const email = accountDetails.idTokenClaims?.emails
|
|
179
|
-
? accountDetails.idTokenClaims.emails[0]
|
|
180
|
-
: null;
|
|
181
|
-
|
|
182
|
-
account.username = preferredUsername || email || "";
|
|
183
|
-
account.loginHint = accountDetails.idTokenClaims?.login_hint;
|
|
184
|
-
account.name = accountDetails.idTokenClaims?.name || "";
|
|
185
|
-
|
|
186
|
-
account.cloudGraphHostName = accountDetails.cloudGraphHostName;
|
|
187
|
-
account.msGraphHost = accountDetails.msGraphHost;
|
|
188
|
-
|
|
189
|
-
if (accountDetails.tenantProfiles) {
|
|
190
|
-
account.tenantProfiles = accountDetails.tenantProfiles;
|
|
191
|
-
} else {
|
|
192
|
-
const tenantProfile = buildTenantProfile(
|
|
193
|
-
accountDetails.homeAccountId,
|
|
194
|
-
account.localAccountId,
|
|
195
|
-
account.realm,
|
|
196
|
-
accountDetails.idTokenClaims
|
|
197
|
-
);
|
|
198
|
-
account.tenantProfiles = [tenantProfile];
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return account;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Creates an AccountEntity object from AccountInfo
|
|
206
|
-
* @param accountInfo
|
|
207
|
-
* @param cloudGraphHostName
|
|
208
|
-
* @param msGraphHost
|
|
209
|
-
* @returns
|
|
210
|
-
*/
|
|
211
|
-
static createFromAccountInfo(
|
|
212
|
-
accountInfo: AccountInfo,
|
|
213
|
-
cloudGraphHostName?: string,
|
|
214
|
-
msGraphHost?: string
|
|
215
|
-
): AccountEntity {
|
|
216
|
-
const account: AccountEntity = new AccountEntity();
|
|
217
|
-
|
|
218
|
-
account.authorityType =
|
|
219
|
-
accountInfo.authorityType || CacheAccountType.GENERIC_ACCOUNT_TYPE;
|
|
220
|
-
account.homeAccountId = accountInfo.homeAccountId;
|
|
221
|
-
account.localAccountId = accountInfo.localAccountId;
|
|
222
|
-
account.nativeAccountId = accountInfo.nativeAccountId;
|
|
223
|
-
|
|
224
|
-
account.realm = accountInfo.tenantId;
|
|
225
|
-
account.environment = accountInfo.environment;
|
|
226
|
-
|
|
227
|
-
account.username = accountInfo.username;
|
|
228
|
-
account.name = accountInfo.name;
|
|
229
|
-
account.loginHint = accountInfo.loginHint;
|
|
230
|
-
|
|
231
|
-
account.cloudGraphHostName = cloudGraphHostName;
|
|
232
|
-
account.msGraphHost = msGraphHost;
|
|
233
|
-
// Serialize tenant profiles map into an array
|
|
234
|
-
account.tenantProfiles = Array.from(
|
|
235
|
-
accountInfo.tenantProfiles?.values() || []
|
|
236
|
-
);
|
|
237
|
-
account.dataBoundary = accountInfo.dataBoundary;
|
|
238
|
-
|
|
239
|
-
return account;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Generate HomeAccountId from server response
|
|
244
|
-
* @param serverClientInfo
|
|
245
|
-
* @param authType
|
|
246
|
-
*/
|
|
247
|
-
static generateHomeAccountId(
|
|
248
|
-
serverClientInfo: string,
|
|
249
|
-
authType: AuthorityType,
|
|
250
|
-
logger: Logger,
|
|
251
|
-
cryptoObj: ICrypto,
|
|
252
|
-
idTokenClaims?: TokenClaims
|
|
253
|
-
): string {
|
|
254
|
-
// since ADFS/DSTS do not have tid and does not set client_info
|
|
255
|
-
if (
|
|
256
|
-
!(
|
|
257
|
-
authType === AuthorityType.Adfs ||
|
|
258
|
-
authType === AuthorityType.Dsts
|
|
259
|
-
)
|
|
260
|
-
) {
|
|
261
|
-
// for cases where there is clientInfo
|
|
262
|
-
if (serverClientInfo) {
|
|
263
|
-
try {
|
|
264
|
-
const clientInfo = buildClientInfo(
|
|
265
|
-
serverClientInfo,
|
|
266
|
-
cryptoObj.base64Decode
|
|
267
|
-
);
|
|
268
|
-
if (clientInfo.uid && clientInfo.utid) {
|
|
269
|
-
return `${clientInfo.uid}.${clientInfo.utid}`;
|
|
270
|
-
}
|
|
271
|
-
} catch (e) {}
|
|
272
|
-
}
|
|
273
|
-
logger.warning("No client info in response");
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// default to "sub" claim
|
|
277
|
-
return idTokenClaims?.sub || "";
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Validates an entity: checks for all expected params
|
|
282
|
-
* @param entity
|
|
283
|
-
*/
|
|
284
|
-
static isAccountEntity(entity: object): entity is AccountEntity {
|
|
285
|
-
if (!entity) {
|
|
286
|
-
return false;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return (
|
|
290
|
-
entity.hasOwnProperty("homeAccountId") &&
|
|
291
|
-
entity.hasOwnProperty("environment") &&
|
|
292
|
-
entity.hasOwnProperty("realm") &&
|
|
293
|
-
entity.hasOwnProperty("localAccountId") &&
|
|
294
|
-
entity.hasOwnProperty("username") &&
|
|
295
|
-
entity.hasOwnProperty("authorityType")
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Helper function to determine whether 2 accountInfo objects represent the same account
|
|
301
|
-
* @param accountA
|
|
302
|
-
* @param accountB
|
|
303
|
-
* @param compareClaims - If set to true idTokenClaims will also be compared to determine account equality
|
|
304
|
-
*/
|
|
305
|
-
static accountInfoIsEqual(
|
|
306
|
-
accountA: AccountInfo | null,
|
|
307
|
-
accountB: AccountInfo | null,
|
|
308
|
-
compareClaims?: boolean
|
|
309
|
-
): boolean {
|
|
310
|
-
if (!accountA || !accountB) {
|
|
311
|
-
return false;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
let claimsMatch = true; // default to true so as to not fail comparison below if compareClaims: false
|
|
315
|
-
if (compareClaims) {
|
|
316
|
-
const accountAClaims = (accountA.idTokenClaims ||
|
|
317
|
-
{}) as TokenClaims;
|
|
318
|
-
const accountBClaims = (accountB.idTokenClaims ||
|
|
319
|
-
{}) as TokenClaims;
|
|
320
|
-
|
|
321
|
-
// issued at timestamp and nonce are expected to change each time a new id token is acquired
|
|
322
|
-
claimsMatch =
|
|
323
|
-
accountAClaims.iat === accountBClaims.iat &&
|
|
324
|
-
accountAClaims.nonce === accountBClaims.nonce;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
return (
|
|
328
|
-
accountA.homeAccountId === accountB.homeAccountId &&
|
|
329
|
-
accountA.localAccountId === accountB.localAccountId &&
|
|
330
|
-
accountA.username === accountB.username &&
|
|
331
|
-
accountA.tenantId === accountB.tenantId &&
|
|
332
|
-
accountA.loginHint === accountB.loginHint &&
|
|
333
|
-
accountA.environment === accountB.environment &&
|
|
334
|
-
accountA.nativeAccountId === accountB.nativeAccountId &&
|
|
335
|
-
claimsMatch
|
|
336
|
-
);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
50
|
+
};
|
|
@@ -31,8 +31,6 @@ export type CredentialEntity = {
|
|
|
31
31
|
tokenType?: AuthenticationScheme;
|
|
32
32
|
/** KeyId for PoP and SSH tokens stored in the kid claim */
|
|
33
33
|
keyId?: string;
|
|
34
|
-
/** Matches the SHA 256 hash of the claims object included in the token request */
|
|
35
|
-
requestedClaimsHash?: string;
|
|
36
34
|
/** Timestamp when the entry was last updated */
|
|
37
35
|
lastUpdatedAt: string;
|
|
38
36
|
};
|
|
@@ -20,6 +20,7 @@ export interface ICacheManager {
|
|
|
20
20
|
/**
|
|
21
21
|
* fetch the account entity from the platform cache
|
|
22
22
|
* @param accountKey
|
|
23
|
+
* @param correlationId
|
|
23
24
|
*/
|
|
24
25
|
getAccount(accountKey: string, correlationId: string): AccountEntity | null;
|
|
25
26
|
|
|
@@ -27,7 +28,6 @@ export interface ICacheManager {
|
|
|
27
28
|
* set account entity in the platform cache
|
|
28
29
|
* @param account
|
|
29
30
|
* @param correlationId
|
|
30
|
-
* @param kmsi
|
|
31
31
|
*/
|
|
32
32
|
setAccount(
|
|
33
33
|
account: AccountEntity,
|
|
@@ -38,6 +38,7 @@ export interface ICacheManager {
|
|
|
38
38
|
/**
|
|
39
39
|
* fetch the idToken entity from the platform cache
|
|
40
40
|
* @param idTokenKey
|
|
41
|
+
* @param correlationId
|
|
41
42
|
*/
|
|
42
43
|
getIdTokenCredential(
|
|
43
44
|
idTokenKey: string,
|
|
@@ -48,7 +49,6 @@ export interface ICacheManager {
|
|
|
48
49
|
* set idToken entity to the platform cache
|
|
49
50
|
* @param idToken
|
|
50
51
|
* @param correlationId
|
|
51
|
-
* @param kmsi
|
|
52
52
|
*/
|
|
53
53
|
setIdTokenCredential(
|
|
54
54
|
idToken: IdTokenEntity,
|
|
@@ -59,6 +59,7 @@ export interface ICacheManager {
|
|
|
59
59
|
/**
|
|
60
60
|
* fetch the idToken entity from the platform cache
|
|
61
61
|
* @param accessTokenKey
|
|
62
|
+
* @param correlationId
|
|
62
63
|
*/
|
|
63
64
|
getAccessTokenCredential(
|
|
64
65
|
accessTokenKey: string,
|
|
@@ -69,7 +70,6 @@ export interface ICacheManager {
|
|
|
69
70
|
* set idToken entity to the platform cache
|
|
70
71
|
* @param accessToken
|
|
71
72
|
* @param correlationId
|
|
72
|
-
* @param kmsi
|
|
73
73
|
*/
|
|
74
74
|
setAccessTokenCredential(
|
|
75
75
|
accessToken: AccessTokenEntity,
|
|
@@ -80,6 +80,7 @@ export interface ICacheManager {
|
|
|
80
80
|
/**
|
|
81
81
|
* fetch the idToken entity from the platform cache
|
|
82
82
|
* @param refreshTokenKey
|
|
83
|
+
* @param correlationId
|
|
83
84
|
*/
|
|
84
85
|
getRefreshTokenCredential(
|
|
85
86
|
refreshTokenKey: string,
|
|
@@ -90,7 +91,6 @@ export interface ICacheManager {
|
|
|
90
91
|
* set idToken entity to the platform cache
|
|
91
92
|
* @param refreshToken
|
|
92
93
|
* @param correlationId
|
|
93
|
-
* @param kmsi
|
|
94
94
|
*/
|
|
95
95
|
setRefreshTokenCredential(
|
|
96
96
|
refreshToken: RefreshTokenEntity,
|
|
@@ -101,27 +101,35 @@ export interface ICacheManager {
|
|
|
101
101
|
/**
|
|
102
102
|
* fetch appMetadata entity from the platform cache
|
|
103
103
|
* @param appMetadataKey
|
|
104
|
+
* @param correlationId
|
|
104
105
|
*/
|
|
105
|
-
getAppMetadata(
|
|
106
|
+
getAppMetadata(
|
|
107
|
+
appMetadataKey: string,
|
|
108
|
+
correlationId: string
|
|
109
|
+
): AppMetadataEntity | null;
|
|
106
110
|
|
|
107
111
|
/**
|
|
108
112
|
* set appMetadata entity to the platform cache
|
|
109
113
|
* @param appMetadata
|
|
114
|
+
* @param correlationId
|
|
110
115
|
*/
|
|
111
116
|
setAppMetadata(appMetadata: AppMetadataEntity, correlationId: string): void;
|
|
112
117
|
|
|
113
118
|
/**
|
|
114
119
|
* fetch server telemetry entity from the platform cache
|
|
115
120
|
* @param serverTelemetryKey
|
|
121
|
+
* @param correlationId
|
|
116
122
|
*/
|
|
117
123
|
getServerTelemetry(
|
|
118
|
-
serverTelemetryKey: string
|
|
124
|
+
serverTelemetryKey: string,
|
|
125
|
+
correlationId: string
|
|
119
126
|
): ServerTelemetryEntity | null;
|
|
120
127
|
|
|
121
128
|
/**
|
|
122
129
|
* set server telemetry entity to the platform cache
|
|
123
130
|
* @param serverTelemetryKey
|
|
124
131
|
* @param serverTelemetry
|
|
132
|
+
* @param correlationId
|
|
125
133
|
*/
|
|
126
134
|
setServerTelemetry(
|
|
127
135
|
serverTelemetryKey: string,
|
|
@@ -132,43 +140,66 @@ export interface ICacheManager {
|
|
|
132
140
|
/**
|
|
133
141
|
* fetch cloud discovery metadata entity from the platform cache
|
|
134
142
|
* @param key
|
|
143
|
+
* @param correlationId
|
|
135
144
|
*/
|
|
136
|
-
getAuthorityMetadata(
|
|
145
|
+
getAuthorityMetadata(
|
|
146
|
+
key: string,
|
|
147
|
+
correlationId: string
|
|
148
|
+
): AuthorityMetadataEntity | null;
|
|
137
149
|
|
|
138
150
|
/**
|
|
139
151
|
* Get cache keys for authority metadata
|
|
152
|
+
* @param correlationId
|
|
140
153
|
*/
|
|
141
|
-
getAuthorityMetadataKeys(): Array<string>;
|
|
154
|
+
getAuthorityMetadataKeys(correlationId: string): Array<string>;
|
|
142
155
|
|
|
143
156
|
/**
|
|
144
157
|
* set cloud discovery metadata entity to the platform cache
|
|
145
158
|
* @param key
|
|
146
159
|
* @param value
|
|
160
|
+
* @param correlationId
|
|
147
161
|
*/
|
|
148
|
-
setAuthorityMetadata(
|
|
162
|
+
setAuthorityMetadata(
|
|
163
|
+
key: string,
|
|
164
|
+
value: AuthorityMetadataEntity,
|
|
165
|
+
correlationId: string
|
|
166
|
+
): void;
|
|
149
167
|
|
|
150
168
|
/**
|
|
151
169
|
* Provide an alias to find a matching AuthorityMetadataEntity in cache
|
|
152
170
|
* @param host
|
|
171
|
+
* @param correlationId
|
|
153
172
|
*/
|
|
154
|
-
getAuthorityMetadataByAlias(
|
|
173
|
+
getAuthorityMetadataByAlias(
|
|
174
|
+
host: string,
|
|
175
|
+
correlationId: string
|
|
176
|
+
): AuthorityMetadataEntity | null;
|
|
155
177
|
|
|
156
178
|
/**
|
|
157
179
|
* given an authority generates the cache key for authorityMetadata
|
|
158
180
|
* @param authority
|
|
181
|
+
* @param correlationId
|
|
159
182
|
*/
|
|
160
|
-
generateAuthorityMetadataCacheKey(
|
|
183
|
+
generateAuthorityMetadataCacheKey(
|
|
184
|
+
authority: string,
|
|
185
|
+
correlationId: string
|
|
186
|
+
): string;
|
|
161
187
|
|
|
162
188
|
/**
|
|
163
189
|
* fetch throttling entity from the platform cache
|
|
164
190
|
* @param throttlingCacheKey
|
|
191
|
+
* @param correlationId
|
|
165
192
|
*/
|
|
166
|
-
getThrottlingCache(
|
|
193
|
+
getThrottlingCache(
|
|
194
|
+
throttlingCacheKey: string,
|
|
195
|
+
correlationId: string
|
|
196
|
+
): ThrottlingEntity | null;
|
|
167
197
|
|
|
168
198
|
/**
|
|
169
199
|
* set throttling entity to the platform cache
|
|
170
200
|
* @param throttlingCacheKey
|
|
171
201
|
* @param throttlingCache
|
|
202
|
+
* @param correlationId
|
|
172
203
|
*/
|
|
173
204
|
setThrottlingCache(
|
|
174
205
|
throttlingCacheKey: string,
|
|
@@ -178,17 +209,15 @@ export interface ICacheManager {
|
|
|
178
209
|
|
|
179
210
|
/**
|
|
180
211
|
* Returns all accounts in cache
|
|
212
|
+
* @param filter
|
|
213
|
+
* @param correlationId
|
|
181
214
|
*/
|
|
182
|
-
getAllAccounts(
|
|
183
|
-
accountFilter: AccountFilter,
|
|
184
|
-
correlationId: string
|
|
185
|
-
): AccountInfo[];
|
|
215
|
+
getAllAccounts(filter: AccountFilter, correlationId: string): AccountInfo[];
|
|
186
216
|
|
|
187
217
|
/**
|
|
188
218
|
* saves a cache record
|
|
189
219
|
* @param cacheRecord
|
|
190
220
|
* @param correlationId
|
|
191
|
-
* @param kmsi
|
|
192
221
|
* @param storeInCache
|
|
193
222
|
*/
|
|
194
223
|
saveCacheRecord(
|
|
@@ -200,9 +229,8 @@ export interface ICacheManager {
|
|
|
200
229
|
|
|
201
230
|
/**
|
|
202
231
|
* retrieve accounts matching all provided filters; if no filter is set, get all accounts
|
|
203
|
-
* @param
|
|
204
|
-
* @param
|
|
205
|
-
* @param realm
|
|
232
|
+
* @param filter
|
|
233
|
+
* @param correlationId
|
|
206
234
|
*/
|
|
207
235
|
getAccountsFilteredBy(
|
|
208
236
|
filter: AccountFilter,
|
|
@@ -212,6 +240,7 @@ export interface ICacheManager {
|
|
|
212
240
|
/**
|
|
213
241
|
* Get AccountInfo object based on provided filters
|
|
214
242
|
* @param filter
|
|
243
|
+
* @param correlationId
|
|
215
244
|
*/
|
|
216
245
|
getAccountInfoFilteredBy(
|
|
217
246
|
filter: AccountFilter,
|
|
@@ -220,33 +249,39 @@ export interface ICacheManager {
|
|
|
220
249
|
|
|
221
250
|
/**
|
|
222
251
|
* Removes all accounts and related tokens from cache.
|
|
252
|
+
* @param correlationId
|
|
223
253
|
*/
|
|
224
254
|
removeAllAccounts(correlationId: string): void;
|
|
225
255
|
|
|
226
256
|
/**
|
|
227
257
|
* returns a boolean if the given account is removed
|
|
228
258
|
* @param account
|
|
259
|
+
* @param correlationId
|
|
229
260
|
*/
|
|
230
261
|
removeAccount(account: AccountInfo, correlationId: string): void;
|
|
231
262
|
|
|
232
263
|
/**
|
|
233
264
|
* returns a boolean if the given account is removed
|
|
234
265
|
* @param account
|
|
266
|
+
* @param correlationId
|
|
235
267
|
*/
|
|
236
268
|
removeAccountContext(account: AccountInfo, correlationId: string): void;
|
|
237
269
|
|
|
238
270
|
/**
|
|
239
271
|
* @param key
|
|
272
|
+
* @param correlationId
|
|
240
273
|
*/
|
|
241
274
|
removeIdToken(key: string, correlationId: string): void;
|
|
242
275
|
|
|
243
276
|
/**
|
|
244
277
|
* @param key
|
|
278
|
+
* @param correlationId
|
|
245
279
|
*/
|
|
246
280
|
removeAccessToken(key: string, correlationId: string): void;
|
|
247
281
|
|
|
248
282
|
/**
|
|
249
283
|
* @param key
|
|
284
|
+
* @param correlationId
|
|
250
285
|
*/
|
|
251
286
|
removeRefreshToken(key: string, correlationId: string): void;
|
|
252
287
|
}
|