Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brentschmaltz opened this issue Aug 12, 2020 · 1 comment · Fixed by #24886
Closed

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

brentschmaltz opened this issue Aug 12, 2020 · 1 comment · Fixed by #24886
Assignees
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer bug This issue describes a behavior which is not expected - a bug.
Milestone

Comments

@brentschmaltz
Copy link
Contributor

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
@brentschmaltz
Copy link
Contributor Author

@JunTaoLuo thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Sep 13, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants