Package com.streamreduce.core.model

Examples of com.streamreduce.core.model.ConnectionCredentialsEncrypter


        return connection;
    }

    private void decryptCredentials(Connection connection) {
        ConnectionCredentialsEncrypter credentialsEncrypter = new ConnectionCredentialsEncrypter();
        // force decryption until we upgrade to morphia 1.0
        if (connection.getCredentials() != null) {
            credentialsEncrypter.decrypt(connection.getCredentials());
        }
        if (CollectionUtils.isNotEmpty(connection.getOutboundConfigurations())) {
            for (OutboundConfiguration outboundConfiguration : connection.getOutboundConfigurations()) {
                if (outboundConfiguration.getCredentials() != null) {
                    credentialsEncrypter.decrypt(outboundConfiguration.getCredentials());
                }
            }
        }
    }
View Full Code Here


        cc.setApiKey(keyValues.get("apiKey"));
        cc.setOauthToken(keyValues.get("oauthToken"));
        cc.setOauthTokenSecret(keyValues.get("oauthTokenSecret"));
        cc.setOauthVerifier(keyValues.get("oauthVerifier"));

        ConnectionCredentialsEncrypter credentialsEncrypter = new ConnectionCredentialsEncrypter();
        credentialsEncrypter.decrypt(cc);

        return cc;
    }
View Full Code Here

            throws IOException {

        //Create a copy so we don't encrypt the existing reference
        ConnectionCredentials copy = ConnectionCredentials.copyOf(connectionCredentials);

        ConnectionCredentialsEncrypter credentialsEncrypter = new ConnectionCredentialsEncrypter();
        credentialsEncrypter.encrypt(copy);

        jgen.writeStartObject();
        if (copy.getIdentity() != null) {
            jgen.writeStringField("identity",copy.getIdentity());
        }
View Full Code Here

TOP

Related Classes of com.streamreduce.core.model.ConnectionCredentialsEncrypter

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.