I am making an authentication project using spring boot. I have used spring starter security but the problem I am facing is I want to permit some pages to be accessible by all. But spring is asking for authentication in using those web pages also.
I have tried this code:
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests().antMatchers("/","/signUp").permitAll().anyRequest().authenticated()
.and()
.httpBasic();
}
i have used following code as well but that also not working in the expected way as i described and asking for authentication
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests().antMatchers("/").permitAll()
.and()
.httpBasic();
}
it is expected to allow access to these pages without authentication but it is asking for authentication.