Dave Syer, 2013
Twitter: @david_syer
Email: dsyer@gopivotal.com
@Configuration
?@rob_winch
project lead (2012)@Configuration
:::java
@Configuration
@EnableWebSecurity
public class SecurityConfiguration {
}
:::java
@Configuration
@EnableWebSecurity
public class SecurityConfiguration {
@Bean
public AuthenticationManager authenticationManager() throws Exception {
return new AuthenticationBuilder().inMemoryAuthentication().withUser("user")
.password("password").roles("USER").and().and().build();
}
}
:::java
@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Bean
public AuthenticationManager authenticationManager() throws Exception {
return new AuthenticationBuilder().inMemoryAuthentication().withUser("user")
.password("password").roles("USER").and().and().build();
}
@Override
protected void configure(HttpConfigurator http) throws Exception {
http.authorizeUrls()
.antMatchers("/**").authenticated()
.and()
.formLogin().permitAll();
}
}
@Configuration
/
#