1 Reply Latest reply on Nov 1, 2016 5:18 AM by kmranganathan

    Customize "AccessDeniedException" default error message.

    g_r

      Hello,


      I am very new to the picketlink project, I am using 2.7.1.Final on wildfly10. with JSF2 CDI, PrimeFaces etc.


      When user invokes the following method from JSF page(Button).


      It will show a error message "Authorization check failed" on the JSF page.


      How to customize the error message? Thanks.


      import org.picketlink.authorization.annotations.RolesAllowed;

       

      @Named
      @RequestScoped
      public class UserBean {

       

         @RolesAllowed({SYSTEM_ADMIN})

         public String callSysAdminMethod() {

              return "this is system admin method";

        }

      }