@Deprecated public class OAuth2RestTemplate extends org.springframework.web.client.RestTemplate implements OAuth2RestOperations
| Constructor and Description |
|---|
OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource)
Deprecated.
|
OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource,
OAuth2ClientContext context)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected OAuth2AccessToken |
acquireAccessToken(OAuth2ClientContext oauth2Context)
Deprecated.
|
protected URI |
appendQueryParameter(URI uri,
OAuth2AccessToken accessToken)
Deprecated.
|
protected org.springframework.http.client.ClientHttpRequest |
createRequest(URI uri,
org.springframework.http.HttpMethod method)
Deprecated.
|
protected <T> T |
doExecute(URI url,
org.springframework.http.HttpMethod method,
org.springframework.web.client.RequestCallback requestCallback,
org.springframework.web.client.ResponseExtractor<T> responseExtractor)
Deprecated.
|
OAuth2AccessToken |
getAccessToken()
Deprecated.
Acquire or renew an access token for the current context if necessary.
|
OAuth2ClientContext |
getOAuth2ClientContext()
Deprecated.
|
OAuth2ProtectedResourceDetails |
getResource()
Deprecated.
|
void |
setAccessTokenProvider(AccessTokenProvider accessTokenProvider)
Deprecated.
|
void |
setAuthenticator(OAuth2RequestAuthenticator authenticator)
Deprecated.
Strategy for extracting an Authorization header from an access token and the request details.
|
void |
setClockSkew(int clockSkew)
Deprecated.
Sets the maximum acceptable clock skew, which is used when checking the
access token expiry. |
void |
setErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
Deprecated.
|
void |
setRetryBadAccessTokens(boolean retryBadAccessTokens)
Deprecated.
Flag to determine whether a request that has an existing access token, and which then leads to an
AccessTokenRequiredException should be retried (immediately, once).
|
acceptHeaderRequestCallback, delete, delete, delete, exchange, exchange, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, getUriTemplateHandler, handleResponse, headersExtractor, headForHeaders, headForHeaders, headForHeaders, httpEntityCallback, httpEntityCallback, optionsForAllow, optionsForAllow, optionsForAllow, patchForObject, patchForObject, patchForObject, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, responseEntityExtractor, setDefaultUriVariables, setMessageConverters, setUriTemplateHandlergetInterceptors, getRequestFactory, setInterceptorsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, delete, delete, exchange, exchange, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, headForHeaders, headForHeaders, headForHeaders, optionsForAllow, optionsForAllow, optionsForAllow, patchForObject, patchForObject, patchForObject, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, putpublic OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource)
public OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource, OAuth2ClientContext context)
public void setAuthenticator(OAuth2RequestAuthenticator authenticator)
authenticator - the authenticator to usepublic void setRetryBadAccessTokens(boolean retryBadAccessTokens)
retryBadAccessTokens - the flag to set (default true)public void setErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
setErrorHandler in class org.springframework.web.client.RestTemplatepublic OAuth2ProtectedResourceDetails getResource()
getResource in interface OAuth2RestOperationsprotected org.springframework.http.client.ClientHttpRequest createRequest(URI uri, org.springframework.http.HttpMethod method) throws IOException
createRequest in class org.springframework.http.client.support.HttpAccessorIOExceptionprotected <T> T doExecute(URI url, org.springframework.http.HttpMethod method, org.springframework.web.client.RequestCallback requestCallback, org.springframework.web.client.ResponseExtractor<T> responseExtractor) throws org.springframework.web.client.RestClientException
doExecute in class org.springframework.web.client.RestTemplateorg.springframework.web.client.RestClientExceptionpublic OAuth2AccessToken getAccessToken() throws UserRedirectRequiredException
getAccessToken in interface OAuth2RestOperationsUserRedirectRequiredExceptionpublic OAuth2ClientContext getOAuth2ClientContext()
getOAuth2ClientContext in interface OAuth2RestOperationsprotected OAuth2AccessToken acquireAccessToken(OAuth2ClientContext oauth2Context) throws UserRedirectRequiredException
UserRedirectRequiredExceptionprotected URI appendQueryParameter(URI uri, OAuth2AccessToken accessToken)
public void setAccessTokenProvider(AccessTokenProvider accessTokenProvider)
public void setClockSkew(int clockSkew)
access token expiry. The default is 30 seconds.clockSkew - the maximum acceptable clock skewCopyright © 2022. All rights reserved.