Added plumbing code for 2.0
This commit is contained in:
1 parent
577c18c752
commit
b78ca90df4
2 files changed
+54
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package org.scribe.builder.api;
|
||||
|
||||
import org.scribe.oauth.OAuthService;
|
||||
|
||||
public class DefaultApi20 implements Api
|
||||
{
|
||||
|
||||
@Override
|
||||
public OAuthService createService(String apiKey, String apiSecret, String callback, String scope)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.scribe.oauth;
|
||||
|
||||
import org.scribe.model.OAuthRequest;
|
||||
import org.scribe.model.Token;
|
||||
import org.scribe.model.Verifier;
|
||||
|
||||
public class OAuth2ServiceImpl implements OAuthService
|
||||
{
|
||||
|
||||
@Override
|
||||
public void addScope(String scope)
|
||||
{
|
||||
throw new UnsupportedOperationException("OAuth 2 does not use scopes");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Token getAccessToken(Token requestToken, Verifier verifier)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Token getRequestToken()
|
||||
{
|
||||
throw new UnsupportedOperationException("OAuth 2 does not use request tokens. Use 'getAccessToken' directly");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion()
|
||||
{
|
||||
return "2.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void signRequest(Token accessToken, OAuthRequest request)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user