use of org.secnod.shiro.jersey.AuthInjectionBinder in project dropwizard-shiro by silb.
the class ShiroBundle method run.
@Override
public void run(T configuration, Environment environment) {
ShiroConfiguration shiroConfig = narrow(configuration);
ResourceConfig resourceConfig = environment.jersey().getResourceConfig();
resourceConfig.register(new AuthorizationFilterFeature());
resourceConfig.register(new SubjectFactory());
resourceConfig.register(new AuthInjectionBinder());
Filter shiroFilter = createFilter(configuration);
environment.servlets().addFilter("ShiroFilter", shiroFilter).addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), false, shiroConfig.filterUrlPattern());
}
Aggregations