Package org.picketlink.idm.credential

Examples of org.picketlink.idm.credential.Password


     *          on login failure.
     */
    public boolean login(AeroGearUser aeroGearUser) {

        credentials.setUserId(aeroGearUser.getUsername());
        credentials.setCredential(new Password(aeroGearUser.getPassword()));


        if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }
View Full Code Here


        identityManager.add(picketLinkUser);
        /*
         * Disclaimer: PlainTextPassword will encode passwords in SHA-512 with SecureRandom-1024 salt
         * See http://lists.jboss.org/pipermail/security-dev/2013-January/000650.html for more information
         */
        identityManager.updateCredential(picketLinkUser, new Password(aeroGearUser.getPassword()));
    }
View Full Code Here

    //users login with their email address
    newTodoListUser.setLoginName(email);
    newTodoListUser.setEmail(email);

    identityManager.add(picketLinkUser);
    identityManager.updateCredential(picketLinkUser, new Password(password));

    entityManager.persist(newTodoListUser);
    entityManager.flush();
    entityManager.detach(newTodoListUser);
View Full Code Here

  private DefaultLoginCredentials credentials;

  @Override
  public User login(String username, String password) {
    credentials.setUserId(username);
    credentials.setCredential(new Password(password));

    if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
      throw new SecurityException();
    }
View Full Code Here

  private DefaultLoginCredentials credentials;

  @Override
  public User login(String username, String password) {
    credentials.setUserId(username);
    credentials.setCredential(new Password(password));

    final AuthenticationResult result;
   
    try {
      result = identity.login();
View Full Code Here

     *          on login failure.
     */
    public boolean login(User user, String password) {

        credentials.setUserId(user.getLoginName());
        credentials.setCredential(new Password(password));

        if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
            throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
        }

View Full Code Here

     * @param user
     */
    @Override
    public void create(User user, String password) {
        identityManager.add(user);
        identityManager.updateCredential(user, new Password(password));
    }
View Full Code Here

     *          on login failure.
     */
    public boolean login(User user, String password) {

        credentials.setUserId(user.getLoginName());
        credentials.setCredential(new Password(password));

        credentialMatcher.validate(user, password);

        if (credentialMatcher.hasExpired()) {
            throw new AeroGearSecurityException(HttpStatus.CREDENTIAL_HAS_EXPIRED);
View Full Code Here

     * @param user
     * @param password
     * @return builder implementation
     */
    public void validate(User user, String password) {
        Credentials credential = new UsernamePasswordCredentials(user.getLoginName(), new Password(password));
        identityManager.validateCredentials(credential);
        this.credential = credential;
    }
View Full Code Here

    public void reset(User user, String currentPassword, String newPassword) {

        credentialMatcher.validate(user, currentPassword);

        if (credentialMatcher.hasExpired() || credentialMatcher.isValid()) {
            this.identityManager.updateCredential(user, new Password(newPassword));
        } else {
            throw new AeroGearSecurityException(HttpStatus.PASSWORD_RESET_FAILED);
        }
    }
View Full Code Here

TOP

Related Classes of org.picketlink.idm.credential.Password

Copyright © 2018 www.massapicom. 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.