1 Reply Latest reply on Oct 23, 2014 4:18 AM by alexchri

    Securing a JEE web app with SecurityConfigurationBuilder does not work

    alexchri

      Hi all,

       

      I have a web application with this class :

       

      import org.picketlink.config.SecurityConfigurationBuilder;

      import org.picketlink.event.SecurityConfigurationEvent;

       

       

      import javax.enterprise.event.Observes;

       

       

      public class HttpSecurityConfiguration {

       

       

          public void onInit(@Observes SecurityConfigurationEvent event) {

              SecurityConfigurationBuilder builder = event.getBuilder();

       

       

              builder

                  .http()

                      .allPaths()

                          .authenticateWith()

                              .form()

                                  .loginPage("/login.xhtml")

                                  .errorPage("/error.xhtml");

              builder.build();

          }

       

       

      }

       

      The method onInit is called but i don't get my application protected !

       

      Am i missing something out there ?

       

      Thanks for any help.