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

Commit 84dfcf5

Browse files
committed
React to Options and Hosting changes
1 parent 6965a66 commit 84dfcf5

File tree

23 files changed

+47
-47
lines changed

23 files changed

+47
-47
lines changed

samples/CookieSample/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class Startup
99
{
1010
public void Configure(IApplicationBuilder app)
1111
{
12-
app.UsePerRequestServices(services => { });
12+
app.UseServices(services => { });
1313
app.UseCookieAuthentication(options =>
1414
{
1515
});

samples/CookieSessionSample/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Startup
1010
{
1111
public void Configure(IApplicationBuilder app)
1212
{
13-
app.UsePerRequestServices(services => { });
13+
app.UseServices(services => { });
1414
app.UseCookieAuthentication(options =>
1515
{
1616
options.SessionStore = new MemoryCacheSessionStore();

samples/SocialSample/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void Configure(IApplicationBuilder app)
2424
{
2525
app.UseErrorPage();
2626

27-
app.UsePerRequestServices(services =>
27+
app.UseServices(services =>
2828
{
2929
services.ConfigureOptions<ExternalAuthenticationOptions>(options =>
3030
{

src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static class CookieAuthenticationExtensions
1515
{
1616
public static IServiceCollection ConfigureCookieAuthentication([NotNull] this IServiceCollection services, [NotNull] Action<CookieAuthenticationOptions> configure)
1717
{
18-
return services.ConfigureOptions(configure);
18+
return services.Configure(configure);
1919
}
2020

2121
/// <summary>
@@ -28,7 +28,7 @@ public static IServiceCollection ConfigureCookieAuthentication([NotNull] this IS
2828
public static IApplicationBuilder UseCookieAuthentication([NotNull] this IApplicationBuilder app, Action<CookieAuthenticationOptions> configureOptions = null, string optionsName = "")
2929
{
3030
return app.UseMiddleware<CookieAuthenticationMiddleware>(
31-
new OptionsAction<CookieAuthenticationOptions>(configureOptions ?? (o => { }))
31+
new ConfigureOptions<CookieAuthenticationOptions>(configureOptions ?? (o => { }))
3232
{
3333
Name = optionsName
3434
});

src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationMiddleware.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class CookieAuthenticationMiddleware : AuthenticationMiddleware<CookieAut
2020
public CookieAuthenticationMiddleware(RequestDelegate next,
2121
IDataProtectionProvider dataProtectionProvider,
2222
ILoggerFactory loggerFactory,
23-
IOptionsAccessor<CookieAuthenticationOptions> options,
24-
IOptionsAction<CookieAuthenticationOptions> configureOptions)
23+
IOptions<CookieAuthenticationOptions> options,
24+
ConfigureOptions<CookieAuthenticationOptions> configureOptions)
2525
: base(next, options, configureOptions)
2626
{
2727
if (Options.Notifications == null)

src/Microsoft.AspNet.Security.Facebook/FacebookAuthenticationExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static class FacebookAuthenticationExtensions
1515
{
1616
public static IServiceCollection ConfigureFacebookAuthentication([NotNull] this IServiceCollection services, [NotNull] Action<FacebookAuthenticationOptions> configure)
1717
{
18-
return services.ConfigureOptions(configure);
18+
return services.Configure(configure);
1919
}
2020

2121
/// <summary>
@@ -26,7 +26,7 @@ public static IServiceCollection ConfigureFacebookAuthentication([NotNull] this
2626
public static IApplicationBuilder UseFacebookAuthentication([NotNull] this IApplicationBuilder app, Action<FacebookAuthenticationOptions> configureOptions = null, string optionsName = "")
2727
{
2828
return app.UseMiddleware<FacebookAuthenticationMiddleware>(
29-
new OptionsAction<FacebookAuthenticationOptions>(configureOptions ?? (o => { }))
29+
new ConfigureOptions<FacebookAuthenticationOptions>(configureOptions ?? (o => { }))
3030
{
3131
Name = optionsName
3232
});

src/Microsoft.AspNet.Security.Facebook/FacebookAuthenticationMiddleware.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public FacebookAuthenticationMiddleware(
2828
RequestDelegate next,
2929
IDataProtectionProvider dataProtectionProvider,
3030
ILoggerFactory loggerFactory,
31-
IOptionsAccessor<ExternalAuthenticationOptions> externalOptions,
32-
IOptionsAccessor<FacebookAuthenticationOptions> options,
33-
IOptionsAction<FacebookAuthenticationOptions> configureOptions = null)
31+
IOptions<ExternalAuthenticationOptions> externalOptions,
32+
IOptions<FacebookAuthenticationOptions> options,
33+
ConfigureOptions<FacebookAuthenticationOptions> configureOptions = null)
3434
: base(next, dataProtectionProvider, loggerFactory, externalOptions, options, configureOptions)
3535
{
3636
if (string.IsNullOrWhiteSpace(Options.AppId))

src/Microsoft.AspNet.Security.Google/GoogleAuthenticationExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static class GoogleAuthenticationExtensions
1515
{
1616
public static IServiceCollection ConfigureGoogleAuthentication([NotNull] this IServiceCollection services, [NotNull] Action<GoogleAuthenticationOptions> configure)
1717
{
18-
return services.ConfigureOptions(configure);
18+
return services.Configure(configure);
1919
}
2020

2121
/// <summary>
@@ -28,7 +28,7 @@ public static IServiceCollection ConfigureGoogleAuthentication([NotNull] this IS
2828
public static IApplicationBuilder UseGoogleAuthentication([NotNull] this IApplicationBuilder app, Action<GoogleAuthenticationOptions> configureOptions = null, string optionsName = "")
2929
{
3030
return app.UseMiddleware<GoogleAuthenticationMiddleware>(
31-
new OptionsAction<GoogleAuthenticationOptions>(configureOptions ?? (o => { }))
31+
new ConfigureOptions<GoogleAuthenticationOptions>(configureOptions ?? (o => { }))
3232
{
3333
Name = optionsName
3434
});

src/Microsoft.AspNet.Security.Google/GoogleAuthenticationMiddleware.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public GoogleAuthenticationMiddleware(
3232
RequestDelegate next,
3333
IDataProtectionProvider dataProtectionProvider,
3434
ILoggerFactory loggerFactory,
35-
IOptionsAccessor<ExternalAuthenticationOptions> externalOptions,
36-
IOptionsAccessor<GoogleAuthenticationOptions> options,
37-
IOptionsAction<GoogleAuthenticationOptions> configureOptions = null)
35+
IOptions<ExternalAuthenticationOptions> externalOptions,
36+
IOptions<GoogleAuthenticationOptions> options,
37+
ConfigureOptions<GoogleAuthenticationOptions> configureOptions = null)
3838
: base(next, dataProtectionProvider, loggerFactory, externalOptions, options, configureOptions)
3939
{
4040
if (Options.Notifications == null)

src/Microsoft.AspNet.Security.MicrosoftAccount/MicrosoftAccountAuthenticationExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ public static class MicrosoftAccountAuthenticationExtensions
1515
{
1616
public static IServiceCollection ConfigureMicrosoftAccountAuthentication([NotNull] this IServiceCollection services, [NotNull] Action<MicrosoftAccountAuthenticationOptions> configure)
1717
{
18-
return services.ConfigureOptions(configure);
18+
return services.Configure(configure);
1919
}
2020

2121
public static IApplicationBuilder UseMicrosoftAccountAuthentication([NotNull] this IApplicationBuilder app, Action<MicrosoftAccountAuthenticationOptions> configureOptions = null, string optionsName = "")
2222
{
2323
return app.UseMiddleware<MicrosoftAccountAuthenticationMiddleware>(
24-
new OptionsAction<MicrosoftAccountAuthenticationOptions>(configureOptions ?? (o => { }))
24+
new ConfigureOptions<MicrosoftAccountAuthenticationOptions>(configureOptions ?? (o => { }))
2525
{
2626
Name = optionsName
2727
});

0 commit comments

Comments
 (0)