public void onInit(@Observes SecurityConfigurationEvent event) {
    SecurityConfigurationBuilder builder = event.getBuilder();

    builder
        .http()
        .forGroup("basic")
        .authenticateWith()
        .form()
        .authenticationUri("/login.xhtml")
        .loginPage("/login.xhtml")
        .errorPage("/error.xhtml")
        .restoreOriginalRequest()
        .forPath("/logout")
        .logout()
        .redirectTo("/login.xhtml")
        .forPath("/view/*", "basic")
        .forPath("/run", "basic")
        .forPath("/frameset", "basic")
        .forPath("/webcontent", "basic")
        .forPath("/report", "basic")
        .forPath("/rest/business/*", "basic")
        .forPath("/system/*", "basic")
        .authorizeWith()
        .group("adminstrators");
    //					.authorizeWith()
    //					.role("ADMINISTRATOR");
  }
    public void configureHttpSecurity(@Observes SecurityConfigurationEvent event) {
      SecurityConfigurationBuilder builder = event.getBuilder();

      builder
          .http()
          .forPath("/digestProtectedUri/*")
          .authenticateWith()
          .digest()
          .realmName("PicketLink Test DIGEST Realm");
    }
 public void configureHttpSecurity(@Observes SecurityConfigurationEvent event) {
   SecurityConfigurationBuilder builder = event.getBuilder();
   builder
       .http()
       .allPaths()
       .authenticateWith()
       .form()
       .forPath("/onlyManagerRole")
       .authorizeWith()
       .role("Manager")
       .forPath("/onlyCustomerRole")
       .authorizeWith()
       .role("Customer")
       .forPath("/admin/*")
       .authorizeWith()
       .role("Administrator");
 }
  public void onInit(@Observes SecurityConfigurationEvent event) {
    SecurityConfigurationBuilder builder = event.getBuilder();

    builder.http().allPaths().authenticateWith().digest();
  }