Esempio n. 1
0
        public static void TryThrowServiceException(string thumbprint, ThrottlingCache cache, ICoreLogger logger, string providerName)
        {
            if (cache.TryGetOrRemoveExpired(thumbprint, logger, out var ex))
            {
                logger.WarningPii(
                    $"[Throttling] Exception thrown because of throttling rule {providerName} - thumbprint: {thumbprint}",
                    $"[Throttling] Exception thrown because of throttling rule {providerName}");

                // mark the exception for logging purposes
                throw new MsalThrottledServiceException(ex);
            }
        }
        internal static readonly TimeSpan MaxRetryAfter = TimeSpan.FromSeconds(3600); // internal for test only

        public RetryAfterProvider()
        {
            ThrottlingCache = new ThrottlingCache();
        }
Esempio n. 3
0
 public HttpStatusProvider()
 {
     ThrottlingCache = new ThrottlingCache();
 }
 public UiRequiredProvider()
 {
     ThrottlingCache = new ThrottlingCache();
 }