Skip to content

WsFederation handler should not specify an exact type for exception thrown. #24847

@brentschmaltz

Description

@brentschmaltz

WsFederation unlike OIDC handler expects and exact type, which will break if a new derived exception is thrown.
see WsFed:

if (Options.RefreshOnIssuerKeyNotFound && exception.GetType().Equals(typeof(SecurityTokenSignatureKeyNotFoundException)))

see: OIDC:
if (Options.RefreshOnIssuerKeyNotFound && exception is SecurityTokenSignatureKeyNotFoundException)

OIDC is the preferred model.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Exceptions (if any)

Further technical details

  • ASP.NET Core version
  • Include the output of dotnet --info
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version

Metadata

Metadata

Assignees

Labels

area-authIncludes: Authn, Authz, OAuth, OIDC, BearerbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions