All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.osmtools.spring.OsmConnectionFactory Maven / Gradle / Ivy

package org.osmtools.spring;

import org.osmtools.api.OsmOperations;
import org.springframework.social.connect.support.OAuth1ConnectionFactory;
import org.springframework.social.oauth1.OAuth1ServiceProvider;

public class OsmConnectionFactory extends OAuth1ConnectionFactory {

	public OsmConnectionFactory(String osmApiBaseUrl, String consumerKey, String consumerSecret) {
		super("osm", new OsmServiceProvider(osmApiBaseUrl, consumerKey, consumerSecret), new OsmAdapter());
	}

	public OsmOperations getOsmOperations(String accessToken, String secret) {
		return ((OAuth1ServiceProvider)getServiceProvider()).getApi(accessToken, secret);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy