Examples of matchPassword()


Examples of edu.wpi.cs.wpisuitetng.modules.core.models.User.matchPassword()

    assertEquals(2, inflated.getIdNum());
    assertTrue(inflated.getName().equals("Tyler"));
    assertTrue(inflated.getUsername().equals("twack"));
    assertTrue(inflated.getRole().equals(Role.ADMIN));
   
    assertTrue(inflated.matchPassword("abcde"));
    assertFalse(inflated.matchPassword(null));
  }
 
  @Test
  /**
 
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.core.models.User.matchPassword()

    assertTrue(inflated.getName().equals("Tyler"));
    assertTrue(inflated.getUsername().equals("twack"));
    assertTrue(inflated.getRole().equals(Role.ADMIN));
   
    assertTrue(inflated.matchPassword("abcde"));
    assertFalse(inflated.matchPassword(null));
  }
 
  @Test
  /**
   * Tests User deserialization when the given string is missing fields (but has the unique identifier idNum)
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.core.models.User.matchPassword()

    User inflated = deserializer.fromJson(jsonUser, User.class);
   
    assertEquals(2, inflated.getIdNum());
    assertTrue(inflated.getUsername().equals("Tyler"));
   
    assertFalse(inflated.matchPassword(null));
  }
 
  @Test(expected=JsonParseException.class)
  /**
   * Tests error handling in the deserializer -- an exception should be thrown if
View Full Code Here

Examples of edu.wpi.cs.wpisuitetng.modules.core.models.User.matchPassword()

    // check password
    System.out.println("DEBUG: Authenticate Password");
    // password security
    logger.log(Level.INFO, "Authenticating password for User <" + credentials[0] + ">...");
    String hashedPassword = this.passwordHash.generateHash(credentials[1]);
    if(!user.matchPassword(hashedPassword))
    {
      logger.log(Level.WARNING, "Login attempted with bad password for User <" + credentials[0] + ">");
      throw new AuthenticationException("An invalid password was given. Please check the password and try again.");
    }
    logger.log(Level.INFO, "Password authentication Success! <" + credentials[0] + ">");
View Full Code Here

Examples of net.sf.jportlet.portlet.User.matchPassword()

            UserService usrv = ( UserService ) _serviceContext.getPortletService( UserService.NAME );
            try
            {
                User usr = usrv.getUser( userId );
                if ( usr.matchPassword( password ) )
                {
                    /* Start the session */
                    ( ( PortletRequestImpl ) request ).startSession( usr );

                    /* Notify all the portlets */
 
View Full Code Here

Examples of org.springmodules.feedxt.domain.User.matchPassword()

        this.userRepository.addUser(user);
    }
   
    public User getUserAccount(String username, String password) {
        User user = this.userRepository.getUserByUsername(username);
        if (user != null && user.matchPassword(password)) {
            return user;
        } else {
            return null;
        }
    }
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.