Class DefaultOAuthProvider
java.lang.Object
oauth.signpost.AbstractOAuthProvider
oauth.signpost.basic.DefaultOAuthProvider
- All Implemented Interfaces:
Serializable, OAuthProvider
This default implementation uses
HttpURLConnection type GET
requests to receive tokens from a service provider.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultOAuthProvider(String requestTokenEndpointUrl, String accessTokenEndpointUrl, String authorizationWebsiteUrl) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseConnection(HttpRequest request, HttpResponse response) Called when the connection is being finalized after receiving the response.protected HttpRequestcreateRequest(String endpointUrl) Overrride this method if you want to customize the logic for building a request object for the given endpoint URL.protected HttpResponsesendRequest(HttpRequest request) Override this method if you want to customize the logic for how the given request is sent to the server.Methods inherited from class AbstractOAuthProvider
getAccessTokenEndpointUrl, getAuthorizationWebsiteUrl, getRequestHeaders, getRequestTokenEndpointUrl, getResponseParameter, getResponseParameters, handleUnexpectedResponse, isOAuth10a, removeListener, retrieveAccessToken, retrieveRequestToken, retrieveToken, setListener, setOAuth10a, setRequestHeader, setResponseParameters
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
DefaultOAuthProvider
-
-
Method Details
-
createRequest
Description copied from class:AbstractOAuthProviderOverrride this method if you want to customize the logic for building a request object for the given endpoint URL.- Specified by:
createRequestin classAbstractOAuthProvider- Parameters:
endpointUrl- the URL to which the request will go- Returns:
- the request object
- Throws:
MalformedURLExceptionIOException
-
sendRequest
Description copied from class:AbstractOAuthProviderOverride this method if you want to customize the logic for how the given request is sent to the server.- Specified by:
sendRequestin classAbstractOAuthProvider- Parameters:
request- the request to send- Returns:
- the response to the request
- Throws:
IOException
-
closeConnection
Description copied from class:AbstractOAuthProviderCalled when the connection is being finalized after receiving the response. Use this to do any cleanup / resource freeing.- Overrides:
closeConnectionin classAbstractOAuthProvider- Parameters:
request- the request that has been sentresponse- the response that has been received
-