File tree Expand file tree Collapse file tree
src/main/java/com/okta/developer/jugtours/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import org .springframework .context .annotation .Profile ;
88import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
99import org .springframework .security .config .annotation .web .builders .WebSecurity ;
10- import org .springframework .security .config .annotation .web .configuration .EnableWebSecurity ;
1110import org .springframework .security .config .annotation .web .configuration .WebSecurityConfigurerAdapter ;
1211import org .springframework .security .web .PortResolver ;
1312import org .springframework .security .web .PortResolverImpl ;
2423import java .util .*;
2524
2625@ Configuration
27- @ EnableWebSecurity
2826public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
2927 private static final String SAVED_LOGIN_ORIGIN_URI = SecurityConfiguration .class .getName () + "_SAVED_ORIGIN" ;
3028 private final Logger log = LoggerFactory .getLogger (SecurityConfiguration .class );
@@ -36,7 +34,8 @@ public void configure(WebSecurity web) throws Exception {
3634
3735 @ Override
3836 protected void configure (HttpSecurity http ) throws Exception {
39- http
37+ http .oauth2Login ()
38+ .and ()
4039 .csrf ().csrfTokenRepository (CookieCsrfTokenRepository .withHttpOnlyFalse ())
4140 .and ()
4241 .requestCache ().requestCache (refererRequestCache ())
You can’t perform that action at this time.
0 commit comments