54 lines
987 B
Java
54 lines
987 B
Java
package org.scribe.oauth;
|
|
|
|
import org.scribe.builder.api.*;
|
|
import org.scribe.model.*;
|
|
|
|
public class OAuth2ServiceImpl implements OAuthService
|
|
{
|
|
private final Api api;
|
|
private final OAuthConfig config;
|
|
|
|
public OAuth2ServiceImpl(Api api, OAuthConfig config)
|
|
{
|
|
this.api = api;
|
|
this.config = config;
|
|
}
|
|
|
|
@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)
|
|
{
|
|
|
|
}
|
|
|
|
@Override
|
|
public String getAuthorizationUrl(Token requestToken)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
}
|