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(); }
public HttpStatusProvider() { ThrottlingCache = new ThrottlingCache(); }
public UiRequiredProvider() { ThrottlingCache = new ThrottlingCache(); }