|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.springframework.http.client.support.HttpAccessor
org.springframework.http.client.support.InterceptingHttpAccessor
org.springframework.web.client.RestTemplate
org.springframework.security.oauth2.client.OAuth2RestTemplate
public class OAuth2RestTemplate
Rest template that is able to make OAuth2-authenticated REST requests with the credentials of the provided resource.
| 字段摘要 |
|---|
| 从类 org.springframework.http.client.support.HttpAccessor 继承的字段 |
|---|
logger |
| 构造方法摘要 | |
|---|---|
OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource)
|
|
OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource,
OAuth2ClientContext context)
|
|
| 方法摘要 | ||
|---|---|---|
protected OAuth2AccessToken |
acquireAccessToken(OAuth2ClientContext oauth2Context)
|
|
protected URI |
appendQueryParameter(URI uri,
OAuth2AccessToken accessToken)
|
|
protected org.springframework.http.client.ClientHttpRequest |
createRequest(URI uri,
org.springframework.http.HttpMethod method)
|
|
protected
|
doExecute(URI url,
org.springframework.http.HttpMethod method,
org.springframework.web.client.RequestCallback requestCallback,
org.springframework.web.client.ResponseExtractor<T> responseExtractor)
|
|
OAuth2AccessToken |
getAccessToken()
Acquire or renew an access token for the current context if necessary. |
|
OAuth2ClientContext |
getOAuth2ClientContext()
|
|
void |
setAccessTokenProvider(AccessTokenProvider accessTokenProvider)
|
|
void |
setErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
|
|
void |
setRetryBadAccessTokens(boolean retryBadAccessTokens)
Flag to determine whether a request that has an existing access token, and which then leads to an AccessTokenRequiredException should be retried (immediately, once). |
|
| 从类 org.springframework.web.client.RestTemplate 继承的方法 |
|---|
delete, delete, delete, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, headForHeaders, headForHeaders, headForHeaders, optionsForAllow, optionsForAllow, optionsForAllow, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, setMessageConverters |
| 从类 org.springframework.http.client.support.InterceptingHttpAccessor 继承的方法 |
|---|
getInterceptors, getRequestFactory, setInterceptors |
| 从类 org.springframework.http.client.support.HttpAccessor 继承的方法 |
|---|
setRequestFactory |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 org.springframework.web.client.RestOperations 继承的方法 |
|---|
delete, delete, delete, exchange, exchange, exchange, execute, execute, execute, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, headForHeaders, headForHeaders, headForHeaders, optionsForAllow, optionsForAllow, optionsForAllow, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put |
| 构造方法详细信息 |
|---|
public OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource)
public OAuth2RestTemplate(OAuth2ProtectedResourceDetails resource,
OAuth2ClientContext context)
| 方法详细信息 |
|---|
public void setRetryBadAccessTokens(boolean retryBadAccessTokens)
retryBadAccessTokens - the flag to set (default true)public void setErrorHandler(org.springframework.web.client.ResponseErrorHandler errorHandler)
org.springframework.web.client.RestTemplate 中的 setErrorHandler
protected org.springframework.http.client.ClientHttpRequest createRequest(URI uri,
org.springframework.http.HttpMethod method)
throws IOException
org.springframework.http.client.support.HttpAccessor 中的 createRequestIOException
protected <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
org.springframework.web.client.RestTemplate 中的 doExecuteorg.springframework.web.client.RestClientException
public OAuth2AccessToken getAccessToken()
throws UserRedirectRequiredException
OAuth2RestOperations 中的 getAccessTokenUserRedirectRequiredExceptionpublic OAuth2ClientContext getOAuth2ClientContext()
OAuth2RestOperations 中的 getOAuth2ClientContext
protected OAuth2AccessToken acquireAccessToken(OAuth2ClientContext oauth2Context)
throws UserRedirectRequiredException
UserRedirectRequiredException
protected URI appendQueryParameter(URI uri,
OAuth2AccessToken accessToken)
public void setAccessTokenProvider(AccessTokenProvider accessTokenProvider)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||