Closed madhugarimilla closed 8 years ago
Those dependencies are in com.eclipsesource.jaxrs.provider.security
Hi Bryan, Thanks for the quick reply.
I am trying to setup a authentication filter kind of thing for all my rest resources so when i request for any Rest resource in my application, first authentication need to be established and then the resource can be accessed.
How can i do that by using the example pointed here? Is it mandatory to use AuthenticationHandler and AuthorizationHandler and use roles? How can i do it without using roles ?
The authorization handler is only necessary if you use the @RolesAllowed annotation. You can use the authentication handler to do your authentication, and then do authorization however you want (i.e., document based)
Hey Bryan, I got this thing working but it doesn't work without AuthorizationHandler. If i skip implementing AuthorizationHandler and also not registered it in the Activator , then the authenticate method in Authenticationhandler is not getting called. so i added back the AuthorizationHandler and registered it to make it work.
That sounds fine. I'd suggest that your dummy implementation always returns false in the event that you later include code that uses @RolesAllowed. That would prevent a security hole in the app.
Yes. Thanks
I have configured this bundle from and when i try to implement a authentication handler for my resources using the example provided in
com.eclipsesource.jaxrs.security.example
, i could not able to find these classes in my classpath.com.eclipsesource.jaxrs.provider.security.AuthenticationHandler; com.eclipsesource.jaxrs.provider.security.AuthorizationHandler;
What dependencies do i need to to get access to these?