Package org.exoplatform.services.organization

Examples of org.exoplatform.services.organization.UserHandler.authenticate()


   public void testChangePassword() throws Exception
   {
      UserHandler uHandler = organizationService.getUserHandler();
      User user = uHandler.findUserByName("root");
      assertNotNull(user);
      assertTrue(uHandler.authenticate("root", "gtn"));
     
      // Test changing password
      user.setPassword("newPassword");
      uHandler.saveUser(user, false);
      user = uHandler.findUserByName("root");
View Full Code Here


      // Test changing password
      user.setPassword("newPassword");
      uHandler.saveUser(user, false);
      user = uHandler.findUserByName("root");
      assertNotNull(user);
      assertTrue(uHandler.authenticate("root", "newPassword"));   

      // Reset to default password
      user.setPassword("gtn");
      uHandler.saveUser(user, false);
View Full Code Here

            PasswordEncrypter pe = new DigestPasswordEncrypter(username, passwordContext);
            success = ((ExtendedUserHandler)userHandler).authenticate(username, password, pe);
         }
         else
         {
            success = userHandler.authenticate(username, password);
         }
         // No exception occurred
         lastExceptionOnValidateUser.remove();
      }
      catch (DisabledUserException e)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.