Package org.springframework.security.providers.encoding

Examples of org.springframework.security.providers.encoding.PasswordEncoder


        boolean doEncrypt = Boolean.valueOf(encryptPasswords).booleanValue();
       
        if (doEncrypt) {
            DaoAuthenticationProvider provider = (DaoAuthenticationProvider) ctx.getBean("org.springframework.security.providers.dao.DaoAuthenticationProvider#0");
            String algorithm = WebloggerConfig.getProperty("passwds.encryption.algorithm");
            PasswordEncoder encoder = null;
            if (algorithm.equalsIgnoreCase("SHA")) {
                encoder = new ShaPasswordEncoder();
            } else if (algorithm.equalsIgnoreCase("MD5")) {
                encoder = new Md5PasswordEncoder();
            } else {
View Full Code Here


    syncedUser.setDescription( proxyUser.getDescription() );

    // PPP-1527: Password is never sent back to the UI. It always shows as blank. If the user leaves it blank,
    // password is not changed. If the user enters a value, set the password.
    if ( !StringUtils.isBlank( proxyUser.getPassword() ) ) {
      PasswordEncoder encoder =
          PentahoSystem.get( PasswordEncoder.class, "passwordEncoder", PentahoSessionHolder.getSession() ); //$NON-NLS-1$
      syncedUser.setPassword( encoder.encodePassword( proxyUser.getPassword(), null ) );
    }
    syncedUser.setEnabled( proxyUser.getEnabled() );
    return syncedUser;
  }
View Full Code Here

TOP

Related Classes of org.springframework.security.providers.encoding.PasswordEncoder

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.