public class OkHttpClientAdapter<T extends AccessToken> extends Object implements TokenServiceHttpClient
| Modifier and Type | Field and Description |
|---|---|
static okhttp3.MediaType |
JSON |
protected static org.slf4j.Logger |
LOGGER |
protected okhttp3.OkHttpClient |
okHttpClient |
protected RefreshTokenGrantRequest |
refreshTokenGrantRequest |
protected String |
serviceBaseUrl |
static okhttp3.MediaType |
WWW_FORM_ENCODED |
DEFAULT_PATH| Constructor and Description |
|---|
OkHttpClientAdapter(String serviceBaseUrl,
okhttp3.OkHttpClient httpClient,
DataBindingProvider<?> dataBindingProvider,
Class<T> accessTokenClass) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
handleProtocolError(okhttp3.Response response,
String operationName) |
T |
post(String urlPath,
AccessTokenGrantRequest grantRequest) |
protected static final org.slf4j.Logger LOGGER
protected String serviceBaseUrl
protected RefreshTokenGrantRequest refreshTokenGrantRequest
protected okhttp3.OkHttpClient okHttpClient
public static final okhttp3.MediaType WWW_FORM_ENCODED
public static final okhttp3.MediaType JSON
public OkHttpClientAdapter(String serviceBaseUrl, okhttp3.OkHttpClient httpClient, DataBindingProvider<?> dataBindingProvider, Class<T> accessTokenClass)
public T post(String urlPath, AccessTokenGrantRequest grantRequest) throws IOException
post in interface TokenServiceHttpClientIOExceptionprotected void handleProtocolError(okhttp3.Response response,
String operationName)
throws IOException
IOExceptionCopyright © 2017. All rights reserved.