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,
Pattern regexPattern,
boolean required) |
protected void |
generateError(String response)
Related documentation: https://tools.ietf.org/html/rfc6749#section-5.2
|
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 void generateError(String response)
response - responseprotected OAuth2AccessToken createToken(String accessToken, String tokenType, Integer expiresIn, String refreshToken, String scope, String response)
protected static String extractParameter(String response, Pattern regexPattern, boolean required) throws OAuthException
OAuthExceptionCopyright © 2017. All rights reserved.