Last active
March 7, 2016 18:32
-
-
Save abhirockzz/e9528df2710ee4b0e778 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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