Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active March 7, 2016 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/e9528df2710ee4b0e778 to your computer and use it in GitHub Desktop.
Save abhirockzz/e9528df2710ee4b0e778 to your computer and use it in GitHub Desktop.
@Provider
public class AuthFilterDynamic implements DynamicFeature {
@Override
public void configure(ResourceInfo resInfo, FeatureContext ctx) {
if (UserResource.class.equals(resInfo.getResourceClass()) &&
resInfo.getResourceMethod().getName().contains("PUT")) {
ctx.register(AuthenticationFilter.class);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment