We have a requirement to have a mix of open and auth'ed APIs. Is there a 
configuration technique to do so using dropwizard-auth?

I have something working by adding my own AuthFilter that then defers to 
BasicAuthFilter if the path is one that I need to auth. Like this

BasicCredentialAuthFilter<PrincipalImpl> basicAuthFilter = new 
Builder<PrincipalImpl>()
.buildAuthFilter();

return new AuthFilter<>()
{
@Override
public void filter(ContainerRequestContext requestContext) throws 
IOException {
if (((ContainerRequest) requestContext).getPath(true).equals("foo")) {
basicAuthFilter.filter(requestContext);
}
}
};

Thanks for any info!

-- 
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/8b64d221-d54e-4016-b8ce-0f0395513723n%40googlegroups.com.

Reply via email to