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

Port Facebook middleware from Katana. #34

Merged
merged 1 commit into from
Aug 20, 2014
Merged

Port Facebook middleware from Katana. #34

merged 1 commit into from
Aug 20, 2014

Conversation

Tratcher
Copy link
Member

@Tratcher Tratcher commented Aug 8, 2014

Depends on aspnet/HttpAbstractions#113
TODO: CoreCLR WinHttpHandler does not yet support custom server cert validation.

{
app.UseServices(services =>
{
services.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
Copy link
Member

Choose a reason for hiding this comment

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

When did this happen?

Copy link
Member Author

Choose a reason for hiding this comment

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

In this PR. This data used to be stored in IAppBuilder.Properties, but everything there moved to services.

Choose a reason for hiding this comment

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

We need IBuilder.Properties... I'll file an issue to discuss that in http abstractions

Choose a reason for hiding this comment

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

@Tratcher
Copy link
Member Author

Tratcher commented Aug 8, 2014

@loudej @davidfowl Can we try to get this reviewed today so it doesn't just sit here next week while I'm OOF?

@davidfowl
Copy link
Member

Can you point out major differences from the katana middleware?

@Tratcher
Copy link
Member Author

Tratcher commented Aug 8, 2014

The primary differences are in FacebookAuthenticationMiddleware

  • Constructed with DI
  • ResolveHttpMessageHandler uses WinHttpHandler on CoreClr. Doesn't support custom server cert validation yet.

Misc:

{
internal static class Constants
{
public const string DefaultAuthenticationType = "Facebook";
Copy link
Contributor

Choose a reason for hiding this comment

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

Some of the katana middlewares expose something like OpenIdAuthenticationDefaults.AuthenticationType, WsFederationdefaults.Authentication type. Do we plan to consolidate it now in vnext? In other words do we want a FacebookAuthenticationDefaults.AuthenticationType?

@Tratcher
Copy link
Member Author

Tratcher commented Aug 8, 2014

Updated

IDataProtectionProvider dataProtectionProvider,
ILoggerFactory loggerFactory,
IServiceProvider services,
FacebookAuthenticationOptions options)

Choose a reason for hiding this comment

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

I wonder - with the vNext IOptionsAccessor<TOptions> would we change how that last object could be passed in? Don't need to change in this PR, but something to consider

@lodejard
Copy link

:shipit:

@Tratcher
Copy link
Member Author

Updated to use IBuilder.Properties.

@Tratcher Tratcher merged commit 919fa0c into aspnet:dev Aug 20, 2014
@Tratcher Tratcher deleted the Facebook branch August 20, 2014 21:53
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.

4 participants