Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Add DefaultScheme, remove single fallback #891

Merged
merged 1 commit into from
Jul 7, 2017
Merged

Add DefaultScheme, remove single fallback #891

merged 1 commit into from
Jul 7, 2017

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Jul 7, 2017

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -170,14 +130,6 @@ public virtual void AddScheme(AuthenticationScheme scheme)
{
_requestHandlers.Add(scheme);
}
if (typeof(IAuthenticationSignInHandler).IsAssignableFrom(scheme.HandlerType))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its consistent with IAuthenticationRequestHandler, all AuthenticationHandlers implement Authenticate/Challenge/Forbid. We have one handler that implements SignIn, and two that implement SignOut.

The real difference is that IAuthenticationRequestHandler is still used and can be justified by performance reasons (AuthenticationMiddleware.Invoke avoids instantiating new handlers that don't implement IAuthenticationRequestHandler).

IAuthenticationSignInHandler and IAuthenticationSignOutHandler are now dead code with no use. I can't find any technical reason to keep them. It makes logging a PITA for implementers, it requires a cast for every request and offers 0 benefit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants