public class OslcOAuthClient extends OslcClient
OslcClient.OAuthHttpPool
Modifier and Type | Field and Description |
---|---|
protected net.oauth.OAuthAccessor |
accessor |
httpClient
Constructor and Description |
---|
OslcOAuthClient(String consumerKey,
String consumerSecret)
Creates a two-legged OAuth client.
|
OslcOAuthClient(String requestTokenURL,
String authorizationTokenURL,
String accessTokenURL,
String consumerKey,
String consumerSecret)
Initialize an OAuthClient with the required OAuth URLs
|
OslcOAuthClient(String requestTokenURL,
String authorizationTokenURL,
String accessTokenURL,
String consumerKey,
String consumerSecret,
String oauthRealmName) |
OslcOAuthClient(String requestTokenURL,
String authorizationTokenURL,
String accessTokenURL,
String consumerKey,
String consumerSecret,
String oauthRealmName,
String callback) |
Modifier and Type | Method and Description |
---|---|
org.apache.wink.client.ClientResponse |
createResource(String url,
Object artifact,
String mediaType,
String acceptType)
Create (POST) an artifact to a URL - usually an OSLC Creation Factory
|
protected String |
getAuthorizationHeader(String url,
String httpMethod) |
protected org.apache.wink.client.ClientResponse |
getResource(String url,
Map<String,String> requestHeaders,
String defaultMediaType) |
protected net.oauth.OAuthMessage |
getResourceInternal(String url,
String httpMethod,
boolean restart)
Performs necessary OAuth negotiation.
|
protected boolean |
isTwoLegged()
Are we using two-legged OAuth?
|
org.apache.wink.client.ClientResponse |
updateResource(String url,
Object artifact,
String mediaType,
String acceptType,
String ifMatch)
Update (PUT) an artifact to a URL - usually the URL for an existing OSLC artifact
|
createResource, deleteResource, getClientConfig, getClientPool, getConfiguredSecureSocketProtocol, getHttpClient, getQueryResource, getResource, getResource, getResource, lookupCreationFactory, lookupCreationFactory, lookupCreationFactoryResource, lookupCreationFactoryResource, lookupQueryCapability, lookupServiceProviderUrl, setConfiguredSecureSocketProtocol, updateResource, updateResource
public OslcOAuthClient(String requestTokenURL, String authorizationTokenURL, String accessTokenURL, String consumerKey, String consumerSecret)
requestTokenURL
- authorizationTokenURL
- accessTokenURL
- consumerKey
- consumerSecret
- public OslcOAuthClient(String requestTokenURL, String authorizationTokenURL, String accessTokenURL, String consumerKey, String consumerSecret, String oauthRealmName)
public OslcOAuthClient(String requestTokenURL, String authorizationTokenURL, String accessTokenURL, String consumerKey, String consumerSecret, String oauthRealmName, String callback)
public OslcOAuthClient(String consumerKey, String consumerSecret)
consumerKey
- the OAuth consumer keyconsumerSecret
- the OAuth consumer secretprotected org.apache.wink.client.ClientResponse getResource(String url, Map<String,String> requestHeaders, String defaultMediaType) throws IOException, net.oauth.OAuthException, URISyntaxException
getResource
in class OslcClient
IOException
net.oauth.OAuthException
URISyntaxException
public org.apache.wink.client.ClientResponse updateResource(String url, Object artifact, String mediaType, String acceptType, String ifMatch) throws IOException, net.oauth.OAuthException, URISyntaxException
OslcClient
updateResource
in class OslcClient
IOException
net.oauth.OAuthException
URISyntaxException
public org.apache.wink.client.ClientResponse createResource(String url, Object artifact, String mediaType, String acceptType) throws IOException, net.oauth.OAuthException, URISyntaxException
createResource
in class OslcClient
url
- artifact
- mediaType
- acceptType
- URISyntaxException
net.oauth.OAuthException
IOException
protected String getAuthorizationHeader(String url, String httpMethod) throws IOException, net.oauth.OAuthException, URISyntaxException
IOException
net.oauth.OAuthException
URISyntaxException
protected net.oauth.OAuthMessage getResourceInternal(String url, String httpMethod, boolean restart) throws IOException, net.oauth.OAuthException, URISyntaxException
url
- httpMethod
- restart
- IOException
net.oauth.OAuthException
URISyntaxException
protected boolean isTwoLegged()
Copyright © 2020. All Rights Reserved.