Examples of PasswordEncoder


Examples of org.acegisecurity.providers.encoding.PasswordEncoder

       
        if (doEncrypt) {
            DaoAuthenticationProvider provider =
                    (DaoAuthenticationProvider) ctx.getBean("daoAuthenticationProvider");
            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

Examples of org.acegisecurity.providers.encoding.PasswordEncoder

       
        if (doEncrypt) {
            DaoAuthenticationProvider provider =
                    (DaoAuthenticationProvider) ctx.getBean("daoAuthenticationProvider");
            String algorithm = RollerConfig.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

Examples of org.acegisecurity.providers.encoding.PasswordEncoder

        ((SeteUserProfileServiceImpl)sups).setUserDao(mockUserDao);
       
        SeteUserDao mockSeteUserDao = createMock(SeteUserDao.class);
        ((SeteUserProfileServiceImpl)sups).setSeteUserDao(mockSeteUserDao);
       
        PasswordEncoder mockPasswordEncoder = createMock(PasswordEncoder.class);
        ((SeteUserProfileServiceImpl)sups).setPasswordEncoder(mockPasswordEncoder);
       
        expect(mockUserDao.findById(Integer.valueOf(csupvo.getUserId()))).andReturn(aSeteUser);
        expect(mockPasswordEncoder.encodePassword(csupvo.getOldPassword(), null)).andReturn("sete");
        expect(mockPasswordEncoder.encodePassword(csupvo.getNewPassword(), null)).andReturn("newSete");
       
        replay(mockUserDao);
        replay(mockPasswordEncoder);
       
        sups.changeSeteUserPassword(csupvo);
View Full Code Here

Examples of org.acegisecurity.providers.encoding.PasswordEncoder

        ((SeteUserProfileServiceImpl)sups).setUserDao(mockUserDao);
       
        SeteUserDao mockSeteUserDao = createMock(SeteUserDao.class);
        ((SeteUserProfileServiceImpl)sups).setSeteUserDao(mockSeteUserDao);
       
        PasswordEncoder mockPasswordEncoder = createMock(PasswordEncoder.class);
        ((SeteUserProfileServiceImpl)sups).setPasswordEncoder(mockPasswordEncoder);
       
        expect(mockUserDao.findById(Integer.valueOf(csupvo.getUserId()))).andReturn(aSeteUser);
        expect(mockPasswordEncoder.encodePassword(csupvo.getOldPassword(), null)).andReturn("sete");
        expect(mockPasswordEncoder.encodePassword(csupvo.getNewPassword(), null)).andReturn("newSete");
       
        replay(mockUserDao);
        replay(mockPasswordEncoder);
       
        try{
View Full Code Here

Examples of org.acegisecurity.providers.encoding.PasswordEncoder

       
        if (doEncrypt) {
            DaoAuthenticationProvider provider =
                    (DaoAuthenticationProvider) ctx.getBean("daoAuthenticationProvider");
            String algorithm = RollerConfig.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

Examples of org.acegisecurity.providers.encoding.PasswordEncoder

       
        if (doEncrypt) {
            DaoAuthenticationProvider provider =
                    (DaoAuthenticationProvider) ctx.getBean("daoAuthenticationProvider");
            String algorithm = RollerConfig.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

Examples of org.apache.archiva.redback.policy.PasswordEncoder

                    authnResultErrors.add(
                        new AuthenticationFailureCause( AuthenticationConstants.AUTHN_MUST_CHANGE_PASSWORD_EXCEPTION,
                                                        e.getMessage() ) );
                }

                PasswordEncoder encoder = securityPolicy.getPasswordEncoder();
                log.debug( "PasswordEncoder: {}", encoder.getClass().getName() );

                boolean isPasswordValid = encoder.isPasswordValid( user.getEncodedPassword(), source.getPassword() );
                if ( isPasswordValid )
                {
                    log.debug( "User {} provided a valid password", source.getUsername() );

                    try
View Full Code Here

Examples of org.apache.archiva.redback.policy.PasswordEncoder

                    authnResultErrors.add(
                        new AuthenticationFailureCause( AuthenticationConstants.AUTHN_MUST_CHANGE_PASSWORD_EXCEPTION,
                                                        e.getMessage() ) );
                }

                PasswordEncoder encoder = securityPolicy.getPasswordEncoder();
                log.debug( "PasswordEncoder: {}", encoder.getClass().getName() );

                boolean isPasswordValid = encoder.isPasswordValid( user.getEncodedPassword(), source.getPassword() );
                if ( isPasswordValid )
                {
                    log.debug( "User {} provided a valid password", source.getUsername() );

                    try
View Full Code Here

Examples of org.codehaus.plexus.security.policy.PasswordEncoder

            if ( user.isLocked() && !user.isPasswordChangeRequired() )
            {
                throw new AccountLockedException( "Account " + source.getPrincipal() + " is locked.", user );
            }
           
            PasswordEncoder encoder = securityPolicy.getPasswordEncoder();
            getLogger().debug( "PasswordEncoder: " + encoder.getClass().getName() );
           
            boolean isPasswordValid = encoder.isPasswordValid( user.getEncodedPassword(), source.getPassword() );
            if ( isPasswordValid )
            {
                getLogger().debug( "User " + source.getPrincipal() + " provided a valid password" );
               
                try
View Full Code Here

Examples of org.jasypt.spring.security3.PasswordEncoder

        setReversible(false);
    }

    @Override
    protected PasswordEncoder createStringEncoder() {
        PasswordEncoder encoder = new PasswordEncoder();
        encoder.setPasswordEncryptor(new StrongPasswordEncryptor());
        return encoder;
    }
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.