Package org.glassfish.security.common

Examples of org.glassfish.security.common.MasterPassword


            for (File f : files) {
                //the following property is required for initializing the password helper
                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final MasterPassword masterPasswordHelper = Globals.getDefaultHabitat().getComponent(MasterPassword.class, "Security SSL Password Provider Service");

                    final PasswordAdapter pa = masterPasswordHelper.getMasterPasswordAdapter();
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        masterPasswordHelper.setMasterPassword(mPass.toCharArray());
                        expandedPassword = masterPasswordHelper.getMasterPasswordAdapter().getPasswordForAlias(alias);
                    }
                }
                catch (Exception e) {
                    if (logger.isLoggable(Level.FINER)) {
                        logger.finer(StringUtils.cat(": ", alias, e.getMessage()));
View Full Code Here


            for (File f : files) {
                //the following property is required for initializing the password helper
                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final MasterPassword masterPasswordHelper = Globals.getDefaultHabitat().getComponent(MasterPassword.class, "Security SSL Password Provider Service");

                    final PasswordAdapter pa = masterPasswordHelper.getMasterPasswordAdapter();
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        masterPasswordHelper.setMasterPassword(mPass.toCharArray());
                        expandedPassword = masterPasswordHelper.getMasterPasswordAdapter().getPasswordForAlias(alias);
                    }
                }
                catch (Exception e) {
                    if (logger.isLoggable(Level.FINER)) {
                        logger.finer(StringUtils.cat(": ", alias, e.getMessage()));
View Full Code Here

        if (value!=null && value instanceof String) {
            String stringValue = value.toString();
            if (stringValue.indexOf('$')==-1) {
                return value;
            }
            MasterPassword masterpasswd =  habitat.getService(MasterPassword.class);
            if (masterpasswd!= null) {
                if (getAlias(stringValue) != null) {
                    try{
                        return getRealPasswordFromAlias(masterpasswd,stringValue);
                    } catch (Exception e) {
View Full Code Here

        if (value!=null && value instanceof String) {
            String stringValue = value.toString();
            if (stringValue.indexOf('$')==-1) {
                return value;
            }
            MasterPassword masterpasswd =  habitat.getByContract(MasterPassword.class);
            if (masterpasswd!= null) {
                if (getAlias(stringValue) != null) {
                    try{
                        return getRealPasswordFromAlias(masterpasswd,stringValue);
                    } catch (Exception e) {
View Full Code Here

            for (File f : files) {
                //the following property is required for initializing the password helper
                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final MasterPassword masterPasswordHelper = Globals.getDefaultHabitat().getComponent(MasterPassword.class, "Security SSL Password Provider Service");

                    final PasswordAdapter pa = masterPasswordHelper.getMasterPasswordAdapter();
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        masterPasswordHelper.setMasterPassword(mPass.toCharArray());
                        expandedPassword = masterPasswordHelper.getMasterPasswordAdapter().getPasswordForAlias(alias);
                    }
                }
                catch (Exception e) {
                    if (logger.isLoggable(Level.FINER)) {
                        logger.finer(StringUtils.cat(": ", alias, e.getMessage()));
View Full Code Here

TOP

Related Classes of org.glassfish.security.common.MasterPassword

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.