public interface CredentialsFetcher
限定符和类型 | 方法和说明 |
---|---|
URL |
buildUrl()
构造授权服务器的URL
|
ServiceCredentials |
fetch()
从授权服务器获取授权
|
ServiceCredentials |
fetch(int retryTimes)
从授权服务器获取授权
|
ServiceCredentials |
parse(HttpResponse response)
解析授权服务器返回的授权信息,解析为Credentials
|
HttpResponse |
send(HttpRequest request)
发送HTTP请求到授权服务器
|
URL buildUrl() throws ClientException
ClientException
HttpResponse send(HttpRequest request) throws IOException
request
- HTTP请求IOException
ServiceCredentials parse(HttpResponse response) throws ClientException
response
- 授权服务器返回的授权信息ClientException
ServiceCredentials fetch() throws ClientException
ClientException
ServiceCredentials fetch(int retryTimes) throws ClientException
retryTimes
- 失败重试此时ClientException
Copyright © 2019. All Rights Reserved.