I'm trying to set up my site so that I skip the login in a view in AngularJS (my view in angle is called /validate#/validateusername/
) but I could not get it, any suggestions on how I can achieve this?
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception{
auth.inMemoryAuthentication().withUser("137").password("user").roles("USER");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/forgotpassword").permitAll()
.antMatchers("/validateusername/").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login")
.usernameParameter("username")
.permitAll()
.and()
.logout()
.logoutSuccessUrl("/login?logout")
.permitAll()
.and().csrf().disable();