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