title: Shiro AOP with GUICE not working
body: <p>I am writing a service in which i use Shiro for security. I have also incorporated Guice with it. I create the GUICE injector in a <code>GuiceServletContextListener</code> :</p>
  
  <pre><code>//Custom Shiro Web module with defined REALM
  new MyShiroWebModule(this.servletContext, "/v1/*"),
  
  //Shiro annotations
  new MyAOPModule(),
  </code></pre>
  
  <p>I also bind the Guice Container and GuiceShiroFilter in the <code>JerseyServletModule</code>:</p>
  
  <pre><code>serve("/v1/*").with(GuiceContainer.class, params);                  
  //Adds Shiro filtering  
  MyShiroWebModule.bindGuiceFilter(binder());
  </code></pre>
  
  <p>But the Annotations from Shiro just don't seem to work!</p>
  
  <p>I configure the chains in <code>MyShiroWebModule</code>:</p>
  
  <pre><code>addFilterChain("/v1/res/test", ANON);
  addFilterChain("/v1/**", ROLES, AUTHC_BASIC);
  </code></pre>
  
  <p>So if I use the "ROLES" filter then it scans for roles in the AOP manner of:</p>
  
  <p><code>@RolesAllowed("SomeFancyRole")</code> (SEE EDIT)</p>
  
  <p>But i would like to leverage the GUICE Shiro AOP functionality. I have tried the base ShiroAOPModule instead of my own -> my is for debug to see if the configuration is called.</p>
  
  <p><code>@User, @Authenticated etc.</code> </p>
  
  <p>How can I incorporate this functionality as the documentation states that only "adding" the ShiroAOPModule should work out of the box?
  Thank you in advance</p>
  
  <p>EDIT: </p>
  
  <p>Turns out that the <code>@RolesAllowed</code> is working thanks to adding:</p>
  
  <p><code>params.put(PackagesResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES,                          "com.sun.jersey.api.container.filter.RolesAllowedResourceFilterFactory");</code></p>
  
  <p>in the JerseyServletModule </p>
  
  <p><code>serve("/v1/*").with(GuiceContainer.class, params);</code></p>
  
  <p>So the AOP from Shiro is still not filtered.</p>