I have a Spring boot application using Spring security for authentication.
SecurityConfig.java
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.anyRequest().authenticated()
.and()
.csrf().disable()
.formLogin()
.loginProcessingUrl("/authenticateTheUser")
.permitAll()
.and()
.logout().permitAll();
}
The users are authenticated based on the values in database. I am using BCrypt password encoder for encoding passwords.
When I access the API's it is working correctly. It authorizes when a request is made.
Now I am stuck with linking my spring boot app with Ember JS. When I try to call the /authenticateTheUser method it says invalid cors request.
Can someone help me in getting it solved. Should we use any addons for authorization with Ember JS to call the default login method provided by spring security
Aucun commentaire:
Enregistrer un commentaire