React to AddDataProtection change
This commit is contained in:
parent
5f06906087
commit
240ed82b31
|
|
@ -2,7 +2,7 @@ using System.Security.Claims;
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Security.Cookies;
|
using Microsoft.AspNet.Security.Cookies;
|
||||||
using Microsoft.AspNet.Security.DataProtection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
|
|
||||||
namespace CookieSample
|
namespace CookieSample
|
||||||
{
|
{
|
||||||
|
|
@ -12,7 +12,7 @@ namespace CookieSample
|
||||||
{
|
{
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.UseCookieAuthentication(options =>
|
app.UseCookieAuthentication(options =>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ using System.Security.Claims;
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Security.Cookies;
|
using Microsoft.AspNet.Security.Cookies;
|
||||||
using Microsoft.AspNet.Security.DataProtection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
|
|
||||||
namespace CookieSessionSample
|
namespace CookieSessionSample
|
||||||
{
|
{
|
||||||
|
|
@ -13,7 +13,7 @@ namespace CookieSessionSample
|
||||||
{
|
{
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.UseCookieAuthentication(options =>
|
app.UseCookieAuthentication(options =>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ namespace CookieSample
|
||||||
|
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
services.Configure<ExternalAuthenticationOptions>(options =>
|
services.Configure<ExternalAuthenticationOptions>(options =>
|
||||||
{
|
{
|
||||||
options.SignInAsAuthenticationType = CookieAuthenticationDefaults.AuthenticationType;
|
options.SignInAsAuthenticationType = CookieAuthenticationDefaults.AuthenticationType;
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ using System.Xml.Linq;
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Http.Security;
|
using Microsoft.AspNet.Http.Security;
|
||||||
using Microsoft.AspNet.Security.DataProtection;
|
|
||||||
using Microsoft.AspNet.TestHost;
|
using Microsoft.AspNet.TestHost;
|
||||||
|
using Microsoft.Framework.DependencyInjection;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
|
@ -368,7 +368,7 @@ namespace Microsoft.AspNet.Security.Cookies
|
||||||
{
|
{
|
||||||
return TestServer.Create(app =>
|
return TestServer.Create(app =>
|
||||||
{
|
{
|
||||||
app.UseServices(services => services.Add(DataProtectionServices.GetDefaultServices()));
|
app.UseServices(services => services.AddDataProtection());
|
||||||
app.UseCookieAuthentication(configureOptions);
|
app.UseCookieAuthentication(configureOptions);
|
||||||
app.Use(async (context, next) =>
|
app.Use(async (context, next) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Security.Facebook
|
||||||
{
|
{
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
services.ConfigureFacebookAuthentication(options =>
|
services.ConfigureFacebookAuthentication(options =>
|
||||||
{
|
{
|
||||||
options.AppId = "Test App Id";
|
options.AppId = "Test App Id";
|
||||||
|
|
@ -71,7 +71,7 @@ namespace Microsoft.AspNet.Security.Facebook
|
||||||
{
|
{
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
services.ConfigureFacebookAuthentication(options =>
|
services.ConfigureFacebookAuthentication(options =>
|
||||||
{
|
{
|
||||||
options.AppId = "Test App Id";
|
options.AppId = "Test App Id";
|
||||||
|
|
|
||||||
|
|
@ -467,7 +467,7 @@ namespace Microsoft.AspNet.Security.Google
|
||||||
{
|
{
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
services.Configure<ExternalAuthenticationOptions>(options =>
|
services.Configure<ExternalAuthenticationOptions>(options =>
|
||||||
{
|
{
|
||||||
options.SignInAsAuthenticationType = CookieAuthenticationType;
|
options.SignInAsAuthenticationType = CookieAuthenticationType;
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ namespace Microsoft.AspNet.Security.Tests.MicrosoftAccount
|
||||||
{
|
{
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
services.Configure<ExternalAuthenticationOptions>(options =>
|
services.Configure<ExternalAuthenticationOptions>(options =>
|
||||||
{
|
{
|
||||||
options.SignInAsAuthenticationType = "External";
|
options.SignInAsAuthenticationType = "External";
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ namespace Microsoft.AspNet.Security.Twitter
|
||||||
{
|
{
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
services.Add(DataProtectionServices.GetDefaultServices());
|
services.AddDataProtection();
|
||||||
services.Configure<ExternalAuthenticationOptions>(options =>
|
services.Configure<ExternalAuthenticationOptions>(options =>
|
||||||
{
|
{
|
||||||
options.SignInAsAuthenticationType = "External";
|
options.SignInAsAuthenticationType = "External";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue