public abstract class HttpCredentialsFetcher extends Object implements CredentialsFetcher
| Constructor and Description |
|---|
HttpCredentialsFetcher() |
| Modifier and Type | Method and Description |
|---|---|
abstract URL |
buildUrl()
构造授权服务器的URL
|
ServiceCredentials |
fetch()
从授权服务器获取授权
|
ServiceCredentials |
fetch(int retryTimes)
从授权服务器获取授权
|
abstract ServiceCredentials |
parse(HttpResponse response)
解析授权服务器返回的授权信息,解析为Credentials
|
HttpResponse |
send(HttpRequest request)
发送HTTP请求到授权服务器
|
public abstract URL buildUrl() throws ClientException
CredentialsFetcherbuildUrl in interface CredentialsFetcherClientExceptionpublic abstract ServiceCredentials parse(HttpResponse response) throws ClientException
CredentialsFetcherparse in interface CredentialsFetcherresponse - 授权服务器返回的授权信息ClientExceptionpublic ServiceCredentials fetch() throws ClientException
CredentialsFetcherfetch in interface CredentialsFetcherClientExceptionpublic HttpResponse send(HttpRequest request) throws IOException
CredentialsFetchersend in interface CredentialsFetcherrequest - HTTP请求IOExceptionpublic ServiceCredentials fetch(int retryTimes) throws ClientException
CredentialsFetcherfetch in interface CredentialsFetcherretryTimes - 失败重试此时ClientExceptionCopyright © 2024. All Rights Reserved.