4 Replies Latest reply on May 10, 2011 3:46 PM by lightguard

    Seam Security Interceptors

    mo.moritz.grauel.akquinet.de

      Hi,


      I am toying around with seam-security. I have some trouble getting Typesafe Authorization to work for me. I am using seam-security 3.0.0.Final. I have created an annotation:



      @SecurityBindingType
      @Retention(RetentionPolicy.RUNTIME)
      @Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
      public @interface FooRequired {
      }



      And a corresponding method. If I use that annotation in a @ViewConfig it works as expected. However if I annotate a method with it, it has no result at runtime.


      It never gets called.


      After some poking, I was wondering why the SecurityInterceptor is not in the interceptor list of the seam-security beans.xml? Is this a bug? It only lists the TransactionInterceptor


      I have placed a breakpoint inside the SecurityInterceptor and it never get's called.


      If I annotate my secured method the following way:



      @Interceptors({SecurityInterceptor.class})
          @FooRequired
          public void foo(){...}



      Everything works as I expect it. But this is not the intended way, isn't it? Am I doing something wrong?


      Any help would be appreciated.


      Thanks