You can read that issue on the matter, it should help you find a solution
to your problem: https://github.com/dropwizard/dropwizard/issues/1630
Le vendredi 30 décembre 2016 16:44:19 UTC+1, Marcin Nowrot a écrit :
>
> Hello,
>
> I've extended the AuthFilter creating a CustomAuthFilter and registered it
> with Jersey as follows:
>
> environment.jersey().register(CustomAuthFilter.getInstance(customKeyAuthenticator));
>
>
> getInstance above builds the CustomAuthFilter.
>
> Inside this filter I have
>
> @Priority(Priorities.AUTHENTICATION)
> public class CustomAuthFilter extends AuthFilter<String, Principal> {
>
> @Context
> private ResourceInfo resourceInfo;
>
>
> @Override
> public void filter(final ContainerRequestContext requestContext) throws
> IOException {
>
> if
> (resourceInfo.getResourceMethod().isAnnotationPresent(PermitAll.class)) {
>
>
>
> Now my question is: can I just inject ResourceInfo into the
> CustomAuthFilter? Will that injection be thread-safe?
>
> Thanks and Best Regards,
>
> Marcin
>
>
>
>
>
--
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].
For more options, visit https://groups.google.com/d/optout.