How can I achieve user auth on Jersey 1.18 under Tomcat6?
Tomcat6 use Realms (cannot be used for now) or Servlets (with dispatcher logic if user can call URI or not).
Jersey has ServletContainer with filters, but I can't find any for this goal.
What I need is:
With which Class/Jersey.Filter/Jersey.Servlet can be step 3 processed?
I am really sorry, Realms are very handfull, but this server has own Realm modul and for security reasons it cannot be reimplemented. I am worry about using Http Servlets because of Jersey Servlet Container existence.
Thanks for your advices ;-)
By: lrnzcig Feb 25 at 19:20
Hi! I would do an authenticationFilter, you have quite a few answers you can look at, e.g. this one. However, I took a quick look to the documentation of Jersey 1.18 and it's really old! I don't think you can do it the same way in Jersey 1.18. I guess the only way is to add a filter at the tomcat level, if authentication is ok you pass the request to Jersey, if not you return error code. Hope it helps.