BAEL-315 Clean up some code formatting on the security configurations

This commit is contained in:
Tim Schimandle
2016-10-18 21:22:04 -06:00
parent 2777df61a9
commit c7551758d8
4 changed files with 18 additions and 27 deletions
@@ -15,7 +15,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication()
.withUser("user").password("password").roles("USER")
.and()
.and()
.withUser("admin").password("admin").roles("ADMIN");
}
@@ -24,7 +24,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
http
.authorizeRequests()
.antMatchers("/resource/hello/cloud").permitAll()
.antMatchers("/static/eureka/**").hasRole("ADMIN")
.antMatchers("/eureka/**").hasRole("ADMIN")
.anyRequest().authenticated()
.and()
.formLogin()
@@ -33,6 +33,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.logout().permitAll()
.logoutSuccessUrl("/resource/hello/cloud").permitAll()
.and()
.csrf().disable();
.csrf()
.disable();
}
}