2010-09-22 19:04:10 +02:00
|
|
|
package com.google.refine.oauth;
|
2010-04-21 23:08:34 +02:00
|
|
|
|
2010-10-08 03:54:00 +02:00
|
|
|
import oauth.signpost.OAuthConsumer;
|
|
|
|
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
|
|
|
|
|
2010-04-21 23:08:34 +02:00
|
|
|
|
|
|
|
public abstract class Provider {
|
|
|
|
|
|
|
|
protected String host;
|
|
|
|
|
2010-09-29 03:50:57 +02:00
|
|
|
public Provider() {
|
|
|
|
}
|
|
|
|
|
2010-04-21 23:08:34 +02:00
|
|
|
public Provider(String host) {
|
|
|
|
this.host = host;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getHost() {
|
|
|
|
return host;
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract public String getRequestTokenServiceURL();
|
|
|
|
abstract public String getAccessTokenServiceURL();
|
|
|
|
abstract public String getUserAuthorizationURL();
|
2010-10-08 03:54:00 +02:00
|
|
|
|
|
|
|
public OAuthConsumer createConsumer(String consumerKey, String consumerSecret) {
|
|
|
|
return new CommonsHttpOAuthConsumer(consumerKey, consumerSecret);
|
|
|
|
}
|
2010-04-21 23:08:34 +02:00
|
|
|
}
|