// Path: src/main/java/org/springframework/social/salesforce/api/Salesforce.java
// public interface Salesforce extends ApiBinding {
// 
//     public ApiOperations apiOperations();
// 
//     public ApiOperations apiOperations(String instanceUrl);
// 
//     public ChatterOperations chatterOperations();
// 
//     public ChatterOperations chatterOperations(String instanceUrl);
// 
//     public QueryOperations queryOperations();
// 
//     public QueryOperations queryOperations(String instanceUrl);
// 
//     public RecentOperations recentOperations();
// 
//     public RecentOperations recentOperations(String instanceUrl);
// 
//     public SearchOperations searchOperations();
// 
//     public SearchOperations searchOperations(String instanceUrl);
// 
//     public SObjectOperations sObjectsOperations();
// 
//     public SObjectOperations sObjectsOperations(String instanceUrl);
// 
//     public UserOperations userOperations();
// 
//     public UserOperations userOperations(String gatewayUrl);
// 
//     public LimitsOperations limitsOperations();
// 
//     public LimitsOperations limitsOperations(String instanceUrl);
// 
//     public <T> List<T> readList(JsonNode jsonNode, Class<T> type);
// 
//     public <T> T readObject(JsonNode jsonNode, Class<T> type);
// 
//     public String getBaseUrl();
// 
//     public String getInstanceUrl();
// 
//     public void setInstanceUrl(String instanceUrl);
// 
//     public String getUserInfoUrl();
// 
//     public String getAuthGatewayUrl();
// 
//     public void setAuthGatewayBaseUrl(String gatewayUrl);
// 
//     public ConnectOperations connectOperations();
// 
//     public ConnectOperations connectOperations(String instanceUrl);
//     
//     public CustomApiOperations customApiOperations();
// 
//     public CustomApiOperations customApiOperations(String instanceUrl);
// }
// 
// Path: src/main/java/org/springframework/social/salesforce/connect/SalesforceConnectionFactory.java
// public class SalesforceConnectionFactory extends OAuth2ConnectionFactory<Salesforce> {
// 
//     public SalesforceConnectionFactory(String clientId, String clientSecret) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret),
//                 new SalesforceAdapter());
//     }
//     
//     public SalesforceConnectionFactory(String clientId, String clientSecret, boolean sandbox) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret, sandbox),
//                 sandbox ? new SalesforceAdapter(sandbox) : new SalesforceAdapter());
//     }
// 
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String instanceUrl) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret),
//               new SalesforceAdapter(instanceUrl));
//     }
//     
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String instanceUrl, boolean sandbox) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret, sandbox),
//               sandbox ? new SalesforceAdapter(instanceUrl, sandbox) : new SalesforceAdapter(instanceUrl));
//     }
// 
//     @Deprecated
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String authorizeUrl, String tokenUrl) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret,
//                 authorizeUrl, tokenUrl), new SalesforceAdapter());
//     }
// 
//     @Deprecated
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String authorizeUrl, String tokenUrl, String instanceUrl) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret,
//                                                           authorizeUrl, tokenUrl), new SalesforceAdapter(instanceUrl));
//     }
//     
//     @Deprecated
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String authorizeUrl, String tokenUrl, String instanceUrl, String gatewayUrl) {
//         super("salesforce", new SalesforceServiceProvider(clientId, clientSecret,
//                                                           authorizeUrl, tokenUrl), new SalesforceAdapter(instanceUrl, gatewayUrl));
//     }
// 
// }


import org.springframework.social.salesforce.api.Salesforce;
import org.springframework.social.salesforce.connect.SalesforceConnectionFactory;
import org.springframework.social.security.provider.OAuth2AuthenticationService;
/**
 * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.social.salesforce.security;


/**
 * 
 * @author Jared Ottley
 *
 */
public class SalesforceAuthenticationService extends OAuth2AuthenticationService<Salesforce>
{
    public SalesforceAuthenticationService(String consumerKey, String consumerSecret)
    {
// Path: src/main/java/org/springframework/social/salesforce/api/Salesforce.java
// public interface Salesforce extends ApiBinding {
// 
//     public ApiOperations apiOperations();
// 
//     public ApiOperations apiOperations(String instanceUrl);
// 
//     public ChatterOperations chatterOperations();
// 
//     public ChatterOperations chatterOperations(String instanceUrl);
// 
//     public QueryOperations queryOperations();
// 
//     public QueryOperations queryOperations(String instanceUrl);
// 
//     public RecentOperations recentOperations();
// 
//     public RecentOperations recentOperations(String instanceUrl);
// 
//     public SearchOperations searchOperations();
// 
//     public SearchOperations searchOperations(String instanceUrl);
// 
//     public SObjectOperations sObjectsOperations();
// 
//     public SObjectOperations sObjectsOperations(String instanceUrl);
// 
//     public UserOperations userOperations();
// 
//     public UserOperations userOperations(String gatewayUrl);
// 
//     public LimitsOperations limitsOperations();
// 
//     public LimitsOperations limitsOperations(String instanceUrl);
// 
//     public <T> List<T> readList(JsonNode jsonNode, Class<T> type);
// 
//     public <T> T readObject(JsonNode jsonNode, Class<T> type);
// 
//     public String getBaseUrl();
// 
//     public String getInstanceUrl();
// 
//     public void setInstanceUrl(String instanceUrl);
// 
//     public String getUserInfoUrl();
// 
//     public String getAuthGatewayUrl();
// 
//     public void setAuthGatewayBaseUrl(String gatewayUrl);
// 
//     public ConnectOperations connectOperations();
// 
//     public ConnectOperations connectOperations(String instanceUrl);
//     
//     public CustomApiOperations customApiOperations();
// 
//     public CustomApiOperations customApiOperations(String instanceUrl);
// }
// 
// Path: src/main/java/org/springframework/social/salesforce/connect/SalesforceConnectionFactory.java
// public class SalesforceConnectionFactory extends OAuth2ConnectionFactory<Salesforce> {
// 
//     public SalesforceConnectionFactory(String clientId, String clientSecret) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret),
//                 new SalesforceAdapter());
//     }
//     
//     public SalesforceConnectionFactory(String clientId, String clientSecret, boolean sandbox) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret, sandbox),
//                 sandbox ? new SalesforceAdapter(sandbox) : new SalesforceAdapter());
//     }
// 
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String instanceUrl) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret),
//               new SalesforceAdapter(instanceUrl));
//     }
//     
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String instanceUrl, boolean sandbox) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret, sandbox),
//               sandbox ? new SalesforceAdapter(instanceUrl, sandbox) : new SalesforceAdapter(instanceUrl));
//     }
// 
//     @Deprecated
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String authorizeUrl, String tokenUrl) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret,
//                 authorizeUrl, tokenUrl), new SalesforceAdapter());
//     }
// 
//     @Deprecated
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String authorizeUrl, String tokenUrl, String instanceUrl) {
//         super(SalesforceServiceProvider.ID, new SalesforceServiceProvider(clientId, clientSecret,
//                                                           authorizeUrl, tokenUrl), new SalesforceAdapter(instanceUrl));
//     }
//     
//     @Deprecated
//     public SalesforceConnectionFactory(String clientId, String clientSecret, String authorizeUrl, String tokenUrl, String instanceUrl, String gatewayUrl) {
//         super("salesforce", new SalesforceServiceProvider(clientId, clientSecret,
//                                                           authorizeUrl, tokenUrl), new SalesforceAdapter(instanceUrl, gatewayUrl));
//     }
// 
// }


// Path: src/main/java/org/springframework/social/salesforce/security/SalesforceAuthenticationService.java
import org.springframework.social.salesforce.api.Salesforce;
import org.springframework.social.salesforce.connect.SalesforceConnectionFactory;
import org.springframework.social.security.provider.OAuth2AuthenticationService;

/**
 * Copyright (C) 2017 https://github.com/jottley/spring-social-salesforce
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.social.salesforce.security;


/**
 * 
 * @author Jared Ottley
 *
 */
public class SalesforceAuthenticationService extends OAuth2AuthenticationService<Salesforce>
{
    public SalesforceAuthenticationService(String consumerKey, String consumerSecret)
    {
        super(new SalesforceConnectionFactory(consumerKey, consumerSecret));