@@ -86,30 +86,28 @@ public void ConfigureServices(IServiceCollection services)
8686
8787 // Add Authentication services
8888
89- services . AddAuthentication ( OpenIdConnectDefaults . AuthenticationScheme )
90- . AddCookie ( CookieAuthenticationDefaults . AuthenticationScheme )
91- . AddOpenIdConnect ( options => {
92- options . SignInScheme = CookieAuthenticationDefaults . AuthenticationScheme ;
93- options . Authority = identityUrl . ToString ( ) ;
94- options . SignedOutRedirectUri = callBackUrl . ToString ( ) ;
95- options . ClientId = useLoadTest ? "mvctest" : "mvc" ;
96- options . ClientSecret = "secret" ;
97- options . ResponseType = useLoadTest ? "code id_token token" : "code id_token" ;
98- options . SaveTokens = true ;
99- options . GetClaimsFromUserInfoEndpoint = true ;
100- options . RequireHttpsMetadata = false ;
101- options . Scope . Add ( "openid" ) ;
102- options . Scope . Add ( "profile" ) ;
103- options . Scope . Add ( "orders" ) ;
104- options . Scope . Add ( "basket" ) ;
105- options . Scope . Add ( "marketing" ) ;
106- options . Scope . Add ( "locations" ) ;
107- } ) ;
108-
10989 services . AddAuthentication ( options => {
11090 options . DefaultChallengeScheme = OpenIdConnectDefaults . AuthenticationScheme ;
11191 options . DefaultSignInScheme = CookieAuthenticationDefaults . AuthenticationScheme ;
11292 options . DefaultAuthenticateScheme = CookieAuthenticationDefaults . AuthenticationScheme ;
93+ } )
94+ . AddCookie ( CookieAuthenticationDefaults . AuthenticationScheme )
95+ . AddOpenIdConnect ( options => {
96+ options . SignInScheme = CookieAuthenticationDefaults . AuthenticationScheme ;
97+ options . Authority = identityUrl . ToString ( ) ;
98+ options . SignedOutRedirectUri = callBackUrl . ToString ( ) ;
99+ options . ClientId = useLoadTest ? "mvctest" : "mvc" ;
100+ options . ClientSecret = "secret" ;
101+ options . ResponseType = useLoadTest ? "code id_token token" : "code id_token" ;
102+ options . SaveTokens = true ;
103+ options . GetClaimsFromUserInfoEndpoint = true ;
104+ options . RequireHttpsMetadata = false ;
105+ options . Scope . Add ( "openid" ) ;
106+ options . Scope . Add ( "profile" ) ;
107+ options . Scope . Add ( "orders" ) ;
108+ options . Scope . Add ( "basket" ) ;
109+ options . Scope . Add ( "marketing" ) ;
110+ options . Scope . Add ( "locations" ) ;
113111 } ) ;
114112 }
115113
0 commit comments