From eb1d6aec16ab6aa4e8031f484e34ba8317b58c1a Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 13 Aug 2020 15:48:04 -0700 Subject: [PATCH] Update exception handling condition in WsFederationHandler (#24886) Fixes --- .../Authentication/WsFederation/src/WsFederationHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Security/Authentication/WsFederation/src/WsFederationHandler.cs b/src/Security/Authentication/WsFederation/src/WsFederationHandler.cs index 41b9509f57..49d2112c7f 100644 --- a/src/Security/Authentication/WsFederation/src/WsFederationHandler.cs +++ b/src/Security/Authentication/WsFederation/src/WsFederationHandler.cs @@ -295,7 +295,7 @@ namespace Microsoft.AspNetCore.Authentication.WsFederation Logger.ExceptionProcessingMessage(exception); // Refresh the configuration for exceptions that may be caused by key rollovers. The user can also request a refresh in the notification. - if (Options.RefreshOnIssuerKeyNotFound && exception.GetType().Equals(typeof(SecurityTokenSignatureKeyNotFoundException))) + if (Options.RefreshOnIssuerKeyNotFound && exception is SecurityTokenSignatureKeyNotFoundException) { Options.ConfigurationManager.RequestRefresh(); }