public class OAuth2AccessTokenJsonExtractor extends Object implements TokenExtractor<OAuth2AccessToken>
TokenExtractor for OAuth 2.0| Modifier | Constructor and Description |
|---|---|
protected |
OAuth2AccessTokenJsonExtractor() |
| Modifier and Type | Method and Description |
|---|---|
protected OAuth2AccessToken |
createToken(String accessToken,
String tokenType,
Integer expiresIn,
String refreshToken,
String scope,
String response) |
OAuth2AccessToken |
extract(Response response)
Extracts the concrete type of token from the contents of an Http Response
|
protected static String |
extractParameter(String response,
String regex,
boolean required) |
static OAuth2AccessTokenJsonExtractor |
instance() |
public static OAuth2AccessTokenJsonExtractor instance()
public OAuth2AccessToken extract(Response response) throws IOException
TokenExtractorextract in interface TokenExtractor<OAuth2AccessToken>response - the whole responseIOException - in case of troubles while getting body from the responseprotected OAuth2AccessToken createToken(String accessToken, String tokenType, Integer expiresIn, String refreshToken, String scope, String response)
protected static String extractParameter(String response, String regex, boolean required) throws OAuthException
OAuthExceptionCopyright © 2016. All rights reserved.