I have implemented a Rest api using spring and used Spring security for securing the api, my security config code is :
http
.authorizeRequests()
.anyRequest().authenticated()
.and()
.requestCache()
.requestCache(new NullRequestCache())
.and()
.httpBasic();
this code will authenticate all the urls but I want to permit a specific url for anonymous users to sign-up in my application so I did change the security config to below code :
http
.authorizeRequests()
.antMatchers("/signup").permitAll()
.antMatchers("/**").authenticated()
.and()
.requestCache()
.requestCache(new NullRequestCache())
.and()
.httpBasic();
but I still needs to be authenticated to access the /signup request call. How can I permit just some request calls in my api?