public interface CredentialsFetcher
| Modifier and Type | Method and Description |
|---|---|
URL |
buildUrl()
构造授权服务器的URL
|
ServiceCredentials |
fetch()
从授权服务器获取授权
|
ServiceCredentials |
fetch(int retryTimes)
从授权服务器获取授权
|
ServiceCredentials |
parse(HttpResponse response)
解析授权服务器返回的授权信息,解析为Credentials
|
HttpResponse |
send(HttpRequest request)
发送HTTP请求到授权服务器
|
URL buildUrl() throws ClientException
ClientExceptionHttpResponse send(HttpRequest request) throws IOException
request - HTTP请求IOExceptionServiceCredentials parse(HttpResponse response) throws ClientException
response - 授权服务器返回的授权信息ClientExceptionServiceCredentials fetch() throws ClientException
ClientExceptionServiceCredentials fetch(int retryTimes) throws ClientException
retryTimes - 失败重试此时ClientExceptionCopyright © 2024. All Rights Reserved.