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 ofTokenExtractorfor OAuth 2.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedOAuth2AccessTokenExtractor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AccessTokenextract(Response response)Extracts the concrete type of token from the contents of an Http Responsestatic OAuth2AccessTokenExtractorinstance()
-
-
-
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:
extractin interfaceTokenExtractor<OAuth2AccessToken>- Parameters:
response- the whole response- Returns:
- OAuth access token
- Throws:
IOException- in case of troubles while getting body from the response
-
-