Package org.acegisecurity.providers

Examples of org.acegisecurity.providers.ProviderManager


        return super.getAuthenticationFailureUrl();
    }

    @Override
    public AuthenticationManager getAuthenticationManager() {
        ProviderManager manager = (ProviderManager) super.getAuthenticationManager();
        List providers = manager.getProviders();
        return manager;
    }
View Full Code Here


        ApplicationContext ctx =
            WebApplicationContextUtils.getRequiredWebApplicationContext(context);

        boolean encryptPassword = false;
        try {
            ProviderManager provider = (ProviderManager) ctx.getBean("authenticationManager");
            for (Iterator it = provider.getProviders().iterator(); it.hasNext();) {
                AuthenticationProvider p = (AuthenticationProvider) it.next();
                if (p instanceof RememberMeAuthenticationProvider) {
                    config.put("rememberMeEnabled", Boolean.TRUE);
                }
            }
View Full Code Here

        mLogger.info("Remember Me enabled: " + rememberMeEnabled);
       
        context.setAttribute("rememberMeEnabled", rememberMe);
       
        if (rememberMeEnabled) {
            ProviderManager provider = (ProviderManager) ctx.getBean("authenticationManager");
            provider.getProviders().add(ctx.getBean("rememberMeAuthenticationProvider"));
        }
       
        String encryptPasswords = RollerConfig.getProperty("passwds.encryption.enabled");
        boolean doEncrypt = Boolean.valueOf(encryptPasswords).booleanValue();
       
        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 {
                mLogger.error("Encryption algorithm '" + algorithm +
                        "' not supported, disabling encryption.");
            }
            if (encoder != null) {
                provider.setPasswordEncoder(encoder);
                mLogger.info("Password Encryption Algorithm set to '" + algorithm + "'");
            }
        }
       
        if (RollerConfig.getBooleanProperty("securelogin.enabled")) {
View Full Code Here

TOP

Related Classes of org.acegisecurity.providers.ProviderManager

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.