Class AbstractOAuth1TokenExtractor<T extends OAuth1Token>
java.lang.Object
com.github.scribejava.core.extractors.AbstractOAuth1TokenExtractor<T>
- Type Parameters:
T- concrete type of OAuth1Token. access or request
- All Implemented Interfaces:
TokenExtractor<T>
- Direct Known Subclasses:
OAuth1AccessTokenExtractor,OAuth1RequestTokenExtractor
public abstract class AbstractOAuth1TokenExtractor<T extends OAuth1Token> extends java.lang.Object implements TokenExtractor<T>
Abstract base implementation of
TokenExtractor for OAuth 1.0a
The process for extracting access and request tokens is similar so this class can do both things.-
Constructor Summary
Constructors Constructor Description AbstractOAuth1TokenExtractor() -
Method Summary
Modifier and Type Method Description protected abstract TcreateToken(java.lang.String token, java.lang.String secret, java.lang.String response)Textract(Response response)Extracts the concrete type of token from the contents of an Http Response
-
Constructor Details
-
AbstractOAuth1TokenExtractor
public AbstractOAuth1TokenExtractor()
-
-
Method Details
-
extract
Extracts the concrete type of token from the contents of an Http Response- Specified by:
extractin interfaceTokenExtractor<T extends OAuth1Token>- Parameters:
response- the whole response- Returns:
- OAuth access token
- Throws:
java.io.IOException- in case of troubles while getting body from the response
-
createToken
protected abstract T createToken(java.lang.String token, java.lang.String secret, java.lang.String response)
-