public class LegacyOAuthClient extends Object implements OAuthClient
| Constructor and Description |
|---|
LegacyOAuthClient(Properties connectionProperties) |
| Modifier and Type | Method and Description |
|---|---|
protected com.sdl.web.oauth.common.OAuthToken |
doFetchOAuthToken(String urlString,
String requestBody) |
com.sdl.web.oauth.common.OAuthToken |
getToken(String clientId,
String clientSecret)
Gets a token from the token endpoint, we first lookup the location of the token endpoint by contacting the
discovery service.
|
com.sdl.web.oauth.common.OAuthToken |
refreshToken(String clientId,
com.sdl.web.oauth.common.OAuthToken token)
Obtains a refreshed token from the token endpoint.
|
public LegacyOAuthClient(Properties connectionProperties)
public com.sdl.web.oauth.common.OAuthToken getToken(String clientId, String clientSecret) throws ClientException
OAuthClientgetToken in interface OAuthClientclientId - The client_id parameter for OAuthclientSecret - The client_secret parameter for OAuthClientException - If unable to authenticate or unable to get a tokenpublic com.sdl.web.oauth.common.OAuthToken refreshToken(String clientId, com.sdl.web.oauth.common.OAuthToken token) throws ClientException
OAuthClientrefreshToken in interface OAuthClientclientId - The client IDtoken - The previously obtained token containing the refresh_token @return The OAuthTokenClientException - If unable to connect or unable to refresh the tokenCopyright © 2017 SDL Group. All rights reserved.