Update exception handling condition in WsFederationHandler (#24886)

Fixes
This commit is contained in:
John Luo 2020-08-13 15:48:04 -07:00 committed by GitHub
parent fae4a56ff6
commit eb1d6aec16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}