How can I access ContainerRequestContext / UriInfo from an Authorizer 
implementation?

To not work against Dropwizard, I tried to stick to the usual procedure for 
role-based
authentication, e.g.:

final JWTAuthenticationFilter jwtAuthFilter = new 
JWTAuthenticationFilter.Builder()
        .setAuthenticator(new JWTAuthenticator(server, realm))
        .setAuthorizer(new 
ContentAuthorizer(permissionsConfig().accessPermissions()))
        .setPrefix("Bearer")
        .setRealm(realm)
        .buildAuthFilter();


However, my Authorizer implementation (ContentAuthorizer) needs to consider the 
execution context,
in particular the path parameters. I found that DW/Jersey do inject that 
Context into Authorizers.
So is there a preferred way to do this?


-Matthias







-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dropwizard-user/3e620b57c4500857429b53066a5962098c7bec97.camel%40tu-dresden.de.

Reply via email to