Class OAuth2AccessTokenExtractor
- java.lang.Object
-
- com.github.scribejava.core.extractors.OAuth2AccessTokenExtractor
-
- All Implemented Interfaces:
TokenExtractor<OAuth2AccessToken>
public class OAuth2AccessTokenExtractor extends Object implements TokenExtractor<OAuth2AccessToken>
Custom implementation ofTokenExtractor
for OAuth 2.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
OAuth2AccessTokenExtractor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AccessToken
extract(Response response)
Extracts the concrete type of token from the contents of an Http Responsestatic OAuth2AccessTokenExtractor
instance()
-
-
-
Method Detail
-
instance
public static OAuth2AccessTokenExtractor instance()
-
extract
public OAuth2AccessToken extract(Response response) throws IOException
Extracts the concrete type of token from the contents of an Http Response- Specified by:
extract
in interfaceTokenExtractor<OAuth2AccessToken>
- Parameters:
response
- the whole response- Returns:
- OAuth access token
- Throws:
IOException
- in case of troubles while getting body from the response
-
-