Class OAuth2AccessTokenJsonExtractor
java.lang.Object
com.github.scribejava.core.extractors.AbstractJsonExtractor
com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor
- All Implemented Interfaces:
TokenExtractor<OAuth2AccessToken>
public class OAuth2AccessTokenJsonExtractor
extends AbstractJsonExtractor
implements TokenExtractor<OAuth2AccessToken>
JSON (default) implementation of
TokenExtractor for OAuth 2.0-
Field Summary
Fields inherited from class com.github.scribejava.core.extractors.AbstractJsonExtractor
OBJECT_MAPPER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected OAuth2AccessTokencreateToken(String accessToken, String tokenType, Integer expiresIn, String refreshToken, String scope, com.fasterxml.jackson.databind.JsonNode response, String rawResponse) Extracts the concrete type of token from the contents of an Http ResponsevoidgenerateError(Response response) Related documentation: https://tools.ietf.org/html/rfc6749#section-5.2instance()Methods inherited from class com.github.scribejava.core.extractors.AbstractJsonExtractor
extractRequiredParameter
-
Constructor Details
-
OAuth2AccessTokenJsonExtractor
protected OAuth2AccessTokenJsonExtractor()
-
-
Method Details
-
instance
-
extract
Description copied from interface:TokenExtractorExtracts 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
-
generateError
Related documentation: https://tools.ietf.org/html/rfc6749#section-5.2- Parameters:
response- response- Throws:
IOException- IOException
-
createToken
-