1 Reply Latest reply on Mar 17, 2006 3:09 AM by vasa bab

    What's wrong with authentification in jbpm3.1?

    jmix2006 Newbie

      Hi,
      i am using jbpm 3.1 in developing web application with struts.
      this a little par of :
      login.jsp---->task.jsp
      ----> error.jsp

      in the login action ther is a simple code
      -----------------------------------------------------------

      FormBean userbean =(FormBean) form;
      String userName=userbean.getUsername();
      try{
      JbpmContext.getCurrentJbpmContext().setActorId(userName);
      return (mapping.findForward("succes");
      }
      catch(Exception e){
      return (mapping.findForward("failure");
      }
      --------------------------------------------------------------

      and it's work !!! but the problem it's work always even if the user doesn't existe in the database (JBPM_ID_USER)....
      can i have some help
      thanks

        • 1. Re: What's wrong with authentification in jbpm3.1?
          vasa bab Newbie

          Pls do the following
          import org.jbpm.security.Authentication;

          //called DB for getting username and compaare with a screen username

          //this is username from view
          String userName=userbean.getUsername();
          // validate
          if( DBuserName==userName){
          setAuthorizedUserName (userName);
          Authentication.pushAuthenticatedActorId(authorizedUserName);
          return (mapping.findForward("succes");
          } else {
          return (mapping.findForward("failure");
          }