From 18f362f465d77da4cf55e2e47ba29ea75b0d2298 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 13 Aug 2020 14:04:38 -0700 Subject: [PATCH] Update exception handling condition in WsFederationHandler 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 41b9509f578f..49d2112c7f1d 100644 --- a/src/Security/Authentication/WsFederation/src/WsFederationHandler.cs +++ b/src/Security/Authentication/WsFederation/src/WsFederationHandler.cs @@ -295,7 +295,7 @@ protected override async Task HandleRemoteAuthenticateAsync 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(); }