6 Replies Latest reply on Mar 1, 2006 7:10 PM by Ronald van Kuijk

    import authentication

    boerse scholz Newbie

      Hi, i'm trying to authenticate a user:

      The default authenticator is org.jbpm.security.authenticator.JbpmDefaultAutenticator. That implementation will maintain a ThreadLocal stack of authenticated actorId's. Authenticated blocks can be marked with the methods JbpmDefaultAutenticator.pushAuthenticatedActorId(String) and JbpmDefaultAutenticator.popAuthenticatedActorId(). Be sure to always put these demarcations in a try-finally block. For the push and pop methods of this authenticator implementation, there are convenience methods supplied on the base Authentication class. The reason that the JbpmDefaultAutenticator maintains a stack of actorIds instead of just one actorId is simple: it allows the jBPM code to distinct between code that is executed on behalf of the user and code that is executed on behalf of the jbpm engine


      And i:

      import org.jbpm.security.authentication.JbpmDefaultAutenticator;

      and
      public String login() throws NoSuchElementException {
       setAuthorizedUserName(null);
       JbpmDefaultAutenticator.popAuthenticatedActorId();
      
      IdentitySession identitySession = Context.getPersistenceContext().getIdentitySession();
      
      try {
       Object userid = identitySession.verify(userName, userPassword);
       setAuthorizedUserName (userName);
       JbpmDefaultAutenticator.pushAuthenticatedActorId(authorizedUserName);
       return "home";
      } catch (NoSuchElementException e){return "login_error";}
      }
      


      but it says that:
      import org.jbpm.security.authentication.JbpmDefaultAutenticator;

      does not exist (like all the followings objets), what am i doing wrong? i want to authorize a user to enter the system.

      Thank you!