Howdy,

Because Spring integration defines them as method advices? Am unsure and
don't know much about Spring AOP support, but by looking at the code it
looks evident that this will trigger on methods only....

https://github.com/apache/shiro/blob/master/support/spring/src/main/java/org/apache/shiro/spring/security/interceptor/AuthorizationAttributeSourceAdvisor.java

hth,
~t~


On Tue, Dec 27, 2016 at 8:11 AM Laszlo Hornyak <[email protected]>
wrote:

> Hi,
>
> When I use security annotations on a type, shiro ignores it, but when I
> add move the annotation to the method, it works perfectly.
>
> e.g.
>
> @RequiresAuthentication //ignored
> interface FooService {
>
> @GET
> @Path("/auth")
> @RequiresAuthentication // this works
> fun list() : List<String>
>
> }
>
> Shiro is configured with spring, I am using spring 4.2.6 and shiro 1.3.2.
>
>
> Anyone can give an idea why annotations on the type are ignored?
>
> Best regards,
> Laszlo
>
-- 
Thanks,
~t~

Reply via email to