Fix samples
This commit is contained in:
parent
776593ec71
commit
aae2e630b4
|
|
@ -1,16 +1,14 @@
|
|||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.DataProtection;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Http.Authentication;
|
||||
using Microsoft.AspNet.Authentication;
|
||||
using Microsoft.AspNet.Authentication.Cookies;
|
||||
using Microsoft.AspNet.Authentication.Google;
|
||||
using Microsoft.AspNet.Authentication.MicrosoftAccount;
|
||||
using Microsoft.AspNet.Authentication.OAuth;
|
||||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Http.Authentication;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
|
@ -18,11 +16,7 @@ namespace CookieSample
|
|||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
app.UseErrorPage();
|
||||
|
||||
app.UseServices(services =>
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddDataProtection();
|
||||
services.Configure<ExternalAuthenticationOptions>(options =>
|
||||
|
|
@ -36,7 +30,11 @@ namespace CookieSample
|
|||
p.AddIdentity(id);
|
||||
return p;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
app.UseErrorPage();
|
||||
|
||||
app.UseCookieAuthentication(options =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue