Package org.apache.synapse.securevault

Examples of org.apache.synapse.securevault.SecretResolver


     *
     * @return Actual password
     */
    public String getResolvedSecret() {

        SecretResolver secretResolver = null;

        if (localSecretResolver != null && localSecretResolver.isInitialized()) {
            secretResolver = localSecretResolver;
        } else if (globalSecretResolver != null && globalSecretResolver.isInitialized()
                && globalSecretResolver.isTokenProtected(token)) {
            secretResolver = globalSecretResolver;
        }

        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


        if (password != null && !"".equals(password)) {
            secretInformation.setAliasSecret(password);
        }

        SecretResolver secretResolver = SecretResolverFactory.create(properties,
                configurationPrefix);
        secretInformation.setLocalSecretResolver(secretResolver);
        secretInformation.setSecretPrompt(passwordPrompt);

        return secretInformation;
View Full Code Here

                                                            String aliasPassword,
                                                            String passwordPrompt) {

        SecretInformation secretInformation = new SecretInformation();
        secretInformation.setAliasSecret(aliasPassword);
        SecretResolver secretResolver = new SecretResolver();
        secretResolver.init(
                SecretCallbackHandlerFactory.createSecretCallbackHandler(secretProvider));
        secretInformation.setLocalSecretResolver(secretResolver);
        secretInformation.setSecretPrompt(passwordPrompt);
        return secretInformation;
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.securevault.SecretResolver

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.