Package io.dropwizard.auth
Class AuthDynamicFeature
- java.lang.Object
-
- io.dropwizard.auth.AuthDynamicFeature
-
- All Implemented Interfaces:
jakarta.ws.rs.container.DynamicFeature
,jakarta.ws.rs.core.Feature
public class AuthDynamicFeature extends Object implements jakarta.ws.rs.core.Feature, jakarta.ws.rs.container.DynamicFeature
ADynamicFeature
that registers the provided auth filter to resource methods annotated with theRolesAllowed
,PermitAll
andDenyAll
annotations.In conjunction with
RolesAllowedDynamicFeature
it enables authorization AND authentication of requests on the annotated methods.If authorization is not a concern, then
RolesAllowedDynamicFeature
could be omitted. But to enable authentication, thePermitAll
annotation should be placed on the corresponding resource methods.
-
-
Constructor Summary
Constructors Constructor Description AuthDynamicFeature(jakarta.ws.rs.container.ContainerRequestFilter authFilter)
AuthDynamicFeature(Class<? extends jakarta.ws.rs.container.ContainerRequestFilter> authFilterClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(jakarta.ws.rs.container.ResourceInfo resourceInfo, jakarta.ws.rs.core.FeatureContext context)
boolean
configure(jakarta.ws.rs.core.FeatureContext context)
-
-
-
Constructor Detail
-
AuthDynamicFeature
public AuthDynamicFeature(jakarta.ws.rs.container.ContainerRequestFilter authFilter)
-
AuthDynamicFeature
public AuthDynamicFeature(Class<? extends jakarta.ws.rs.container.ContainerRequestFilter> authFilterClass)
-
-
Method Detail
-
configure
public void configure(jakarta.ws.rs.container.ResourceInfo resourceInfo, jakarta.ws.rs.core.FeatureContext context)
- Specified by:
configure
in interfacejakarta.ws.rs.container.DynamicFeature
-
configure
public boolean configure(jakarta.ws.rs.core.FeatureContext context)
- Specified by:
configure
in interfacejakarta.ws.rs.core.Feature
-
-