User Authentication in AngularJs with API Rest in Java / Jersey

2

I'm developing the user authentication module in my application and I'm having some trouble accessing the API, getting a 403 error.

In the old way I was doing, when I sent the request to the service, it correctly returned the data I needed without making a mistake (and it still works, as I kept the old controller for comparison). At the time, to make it work, I had to include Cors.filter in the web.config for access to be allowed (since they are different domains).

Now with the new controller, already using some authentication features (I'm basing myself on the

asked by anonymous 08.11.2015 / 14:58

1 answer

1

For the security part to work the same must be configured on the server.

This can be done with JAAS using Spring Security, Apache Shiro or other solutions.

There are several tutorials on the internet (explain here would be very large), most of them in English, but we have some in Portuguese for example:

  • Spring Security (old but will give you an idea)
  • Apache shiro
  • Spring Security + AngularJS
  • 09.11.2015 / 19:55