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

DefaultForbid/SignOutSchemes + tests #870

Merged
merged 1 commit into from
Jun 14, 2017
Merged

DefaultForbid/SignOutSchemes + tests #870

merged 1 commit into from
Jun 14, 2017

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Jun 13, 2017

Part of the fix for: aspnet/Mvc#6392

Also added some tests + a sugar overload for AddScheme

@Tratcher @davidfowl

/// <typeparam name="THandler">The <see cref="IAuthenticationHandler"/> responsible for the scheme.</typeparam>
/// <param name="name">The name of the scheme being added.</param>
/// <param name="displayName">The display name for the scheme.</param>
public void AddScheme<THandler>(string name, string displayName) where THandler : IAuthenticationHandler
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't look like this will be used outside of tests. No?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure it will, it's what end users could call to add handlers, its analogous to what hosting does: https://github.com/aspnet/IISIntegration/blob/dev/src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs#L53

except that's adding directly to the scheme provider rather than during startup/configure services.

Keep in mind, there's NOTHING on the builder, so the question I'm asking now is if we should nuke all of the Action<AuthenticationSchemeBuilder>... It was more useful when we had a bag on the builder that could be configured.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its just Name + DisplayName + Type, I guess its slightly more future proof with the action.

Copy link
Member Author

Choose a reason for hiding this comment

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

But mainly I just wanted the sugar, we had a bug for this that got punted to 2.1, but since I'm here and adding tests :) aspnet/Security#1186

@HaoK HaoK merged commit df5c673 into dev Jun 14, 2017
@smitpatel smitpatel deleted the haok/def branch June 28, 2017 21:04
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.

3 participants