Package com.force.sdk.oauth.connector

Examples of com.force.sdk.oauth.connector.ForceOAuthConnectionInfo


        securityContextServiceImpl.setUserDataRetrievalService(userDataRetrievalService);
        oauthConnector = new ForceOAuthConnector(userDataRetrievalService);

        // Build a ForceOAuthConnectionInfo object, if applicable
        ForceOAuthConnectionInfo connInfo = null;
        if (config.getInitParameter("endpoint") != null) {
            connInfo = new ForceOAuthConnectionInfo();
            connInfo.setEndpoint(config.getInitParameter("endpoint"));
            connInfo.setOauthKey(config.getInitParameter("oauthKey"));
            connInfo.setOauthSecret(config.getInitParameter("oauthSecret"));
            oauthConnector.setConnectionInfo(connInfo);
        } else if (config.getInitParameter("url") != null) {
            connInfo = new ForceOAuthConnectionInfo();

            String connectionUrl = config.getInitParameter("url");
            if (ForceConnectorUtils.isInjectable(connectionUrl)) {
                connectionUrl = ForceConnectorUtils.extractValue(connectionUrl);
                if (connectionUrl == null || connectionUrl.equals("")) {
                    throw new IllegalArgumentException("Unable to load ForceConnectorConfig from environment or system property "
                            + config.getInitParameter("url"));
                }
            }

            connInfo.setConnectionUrl(connectionUrl);
            oauthConnector.setConnectionInfo(connInfo);
        } else if (config.getInitParameter("connectionName") != null) {
            oauthConnector.setConnectionName(config.getInitParameter("connectionName"));
        } else {
            throw new IllegalArgumentException("Could not find any init state for AuthFilter. "
View Full Code Here


        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
        assertTrue(context.containsBean("connectionStorageFilter"),
                    "Could not find connectionStorageFilter bean after parsing " + configLocation);
       
        ForceOAuthConnectionInfo connInfo = context.getBean("oauthConnectionInfo", ForceOAuthConnectionInfo.class);
        ForceOAuthConnector connector = context.getBean("oauthConnector", ForceOAuthConnector.class);
       
        validateConnectionInfo(connInfo, "Parsing " + configLocation + ", checking ForceOAuthConnectionInfo");

        ForceOAuthConnectionInfo connInfoOnConnector = invoke(connector, "getConnInfo");
        validateConnectionInfo(connInfoOnConnector,
                "Parsing " + configLocation + ", checking ForceOAuthConnectionInfo on ForceOAuthConnector");
       
        verifyAllFiltersArePresent(context);
    }
View Full Code Here

        assertTrue(context.containsBean("rememberMeFilter"),
                    "Could not find rememberMeFilter bean after parsing " + configLocation);
        assertTrue(context.containsBean("connectionStorageFilter"),
                    "Could not find connectionStorageFilter bean after parsing " + configLocation);

        ForceOAuthConnectionInfo connInfo = context.getBean("oauthConnectionInfo", ForceOAuthConnectionInfo.class);
        ForceOAuthConnector connector = context.getBean("oauthConnector", ForceOAuthConnector.class);
        UserDataRetrievalService userDataRetrievalService =
            context.getBean("userDataRetrievalService", UserDataRetrievalService.class);

        assertTrue(userDataRetrievalService.isStoreUsername(),
                "store-user-name was set to true so the storeUsername value "
                    + "on the user data retrieval service should be true");
        validateConnectionInfo(connInfo, "Parsing " + configLocation + ", checking ForceOAuthConnectionInfo");

        ForceOAuthConnectionInfo connInfoOnConnector = invoke(connector, "getConnInfo");
        validateConnectionInfo(connInfoOnConnector,
                "Parsing " + configLocation + ", checking ForceOAuthConnectionInfo on ForceOAuthConnector");

        verifyAllFiltersArePresent(context);
    }
View Full Code Here

TOP

Related Classes of com.force.sdk.oauth.connector.ForceOAuthConnectionInfo

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.