This repository was archived by the owner on Dec 13, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 22using Microsoft . AspNet . Builder ;
33using Microsoft . AspNet . Http ;
44using Microsoft . AspNet . Security . Cookies ;
5+ using Microsoft . AspNet . Security . DataProtection ;
56
67namespace CookieSample
78{
89 public class Startup
910 {
1011 public void Configure ( IApplicationBuilder app )
1112 {
13+ app . UseServices ( services =>
14+ {
15+ services . Add ( DataProtectionServices . GetDefaultServices ( ) ) ;
16+ } ) ;
17+
1218 app . UseCookieAuthentication ( options =>
1319 {
1420 } ) ;
Original file line number Diff line number Diff line change 33using Microsoft . AspNet . Builder ;
44using Microsoft . AspNet . Http ;
55using Microsoft . AspNet . Security . Cookies ;
6+ using Microsoft . AspNet . Security . DataProtection ;
67
78namespace CookieSessionSample
89{
910 public class Startup
1011 {
1112 public void Configure ( IApplicationBuilder app )
1213 {
14+ app . UseServices ( services =>
15+ {
16+ services . Add ( DataProtectionServices . GetDefaultServices ( ) ) ;
17+ } ) ;
18+
1319 app . UseCookieAuthentication ( options =>
1420 {
1521 options . SessionStore = new MemoryCacheSessionStore ( ) ;
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
31using System . Net . Http ;
42using System . Net . Http . Headers ;
53using System . Security . Claims ;
86using Microsoft . AspNet . Http . Security ;
97using Microsoft . AspNet . Security ;
108using Microsoft . AspNet . Security . Cookies ;
11- using Microsoft . AspNet . Security . Facebook ;
9+ using Microsoft . AspNet . Security . DataProtection ;
1210using Microsoft . AspNet . Security . Google ;
1311using Microsoft . AspNet . Security . MicrosoftAccount ;
1412using Microsoft . AspNet . Security . OAuth ;
15- using Microsoft . AspNet . Security . Twitter ;
16- using Newtonsoft . Json . Linq ;
1713using Microsoft . Framework . DependencyInjection ;
14+ using Newtonsoft . Json . Linq ;
1815
1916namespace CookieSample
2017{
@@ -26,6 +23,7 @@ public void Configure(IApplicationBuilder app)
2623
2724 app . UseServices ( services =>
2825 {
26+ services . Add ( DataProtectionServices . GetDefaultServices ( ) ) ;
2927 services . Configure < ExternalAuthenticationOptions > ( options =>
3028 {
3129 options . SignInAsAuthenticationType = CookieAuthenticationDefaults . AuthenticationType ;
You can’t perform that action at this time.
0 commit comments