Package org.wso2.securevault

Examples of org.wso2.securevault.PasswordManager.resolve()


        passwordManagerEl.addChild(protectedTokensEl);
        passwordManagerEl.addChild(passwordProviderEl);   
            dataEl.addChild(passwordManagerEl);
            SecretResolver secretResolver = SecretResolverFactory.create(dataEl, false);
            if (secretResolver != null && secretResolver.isTokenProtected(password)) {
              resolvePwd = secretResolver.resolve(password);
        } else {
          resolvePwd = password;
        }
    } else {
      resolvePwd = password;
View Full Code Here


        passwordManagerEl.addChild(protectedTokensEl);
        passwordManagerEl.addChild(passwordProviderEl);   
            dataEl.addChild(passwordManagerEl);
            SecretResolver secretResolver = SecretResolverFactory.create(dataEl, false);
            if (secretResolver.isInitialized() && secretResolver.isTokenProtected(password)) {
                resolvePwd = secretResolver.resolve(password);
            } else {
                resolvePwd = password;
            }
    } else {
      resolvePwd = password;
View Full Code Here

        }

        if (secretResolver != null) {
            if (aliasSecret != null && !"".equals(aliasSecret)) {
                if (secretPrompt == null) {
                    return secretResolver.resolve(aliasSecret);
                } else {
                    return secretResolver.resolve(aliasSecret, secretPrompt);
                }
            }
        }
View Full Code Here

        if (secretResolver != null) {
            if (aliasSecret != null && !"".equals(aliasSecret)) {
                if (secretPrompt == null) {
                    return secretResolver.resolve(aliasSecret);
                } else {
                    return secretResolver.resolve(aliasSecret, secretPrompt);
                }
            }
        }
        return aliasSecret;
    }
View Full Code Here

                OMElement ksEle = keyParam.getParameterElement().getFirstElement();
                if(ksEle != null){
                    OMElement storePasswordElement = ksEle.getFirstChildWithName(new QName("Password"));
                    OMElement keyPasswordElement = ksEle.getFirstChildWithName(new QName("KeyPassword"));
                    if(secretResolver.isTokenProtected(keyStorePassToken) && storePasswordElement != null){
                        String storePassword = secretResolver.resolve(keyStorePassToken);
                        ksEle.getFirstChildWithName(new QName("Password")).setText(storePassword );

                    }
                    if(secretResolver.isTokenProtected(keyStoreKeyPassToken) && keyPasswordElement != null){
                        String keyPassword  = secretResolver.resolve(keyStoreKeyPassToken);
View Full Code Here

                        String storePassword = secretResolver.resolve(keyStorePassToken);
                        ksEle.getFirstChildWithName(new QName("Password")).setText(storePassword );

                    }
                    if(secretResolver.isTokenProtected(keyStoreKeyPassToken) && keyPasswordElement != null){
                        String keyPassword  = secretResolver.resolve(keyStoreKeyPassToken);
                        ksEle.getFirstChildWithName(new QName("KeyPassword")).setText(keyPassword);
                    }
                }
            }
View Full Code Here

            if (trustParam != null) {
                OMElement tsEle = trustParam.getParameterElement().getFirstElement();
                if(tsEle != null){
                    OMElement storePasswordElement = tsEle.getFirstChildWithName(new QName("Password"));
                    if(secretResolver.isTokenProtected(trustStorePassToken) && storePasswordElement != null){
                        String storePassword = secretResolver.resolve(trustStorePassToken);
                        tsEle.getFirstChildWithName(new QName("Password")).setText(storePassword );
                    }
                }
            }
View Full Code Here

                    }
                }
            }

            if(secretResolver.isTokenProtected(emailSenderPassword) && emailPasswordParam != null) {
                String emailPassword = secretResolver.resolve(emailSenderPassword);
                emailPasswordParam.setValue(emailPassword);
            }
        }
    }
}
View Full Code Here

   * @return Resolved password
   */
  public static String resolvePasswordValue(DataService dataService, String password) {
    SecretResolver secretResolver = dataService.getSecretResolver();
    if (secretResolver != null && secretResolver.isTokenProtected(password)) {
      return secretResolver.resolve(password);
    } else {
      return password;
    }
  }
 
View Full Code Here

              CartridgeConstants.ALIAS_LOCALPART, CartridgeConstants.ALIAS_PREFIX));

          if (secretResolver != null && secretResolver.isInitialized()
              && secretResolver.isTokenProtected(alias)) {
            securityKey = "";
            securityKey = secretResolver.resolve(alias);
            // TODO : a proper testing on the secure vault protected
            // user defined encryption key
          }
        }
      }
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.