public class SessionCredentialProvider extends BasicLifecycleCredentialProvider
限定符和类型 | 类和说明 |
---|---|
static class |
SessionCredentialProvider.StsVersion |
构造器和说明 |
---|
SessionCredentialProvider() |
SessionCredentialProvider(HttpRequest.Builder<java.lang.String> requestBuilder) |
SessionCredentialProvider(HttpRequest.Builder<java.lang.String> requestBuilder,
SessionCredentialProvider.StsVersion stsVersion) |
SessionCredentialProvider(HttpRequest<java.lang.String> httpRequest) |
SessionCredentialProvider(HttpRequest<java.lang.String> httpRequest,
SessionCredentialProvider.StsVersion stsVersion) |
限定符和类型 | 方法和说明 |
---|---|
protected HttpRequest<java.lang.String> |
buildRequest(HttpRequest.Builder<java.lang.String> requestBuilder)
构建请求 Request,默认直接返回
SessionCredentialProvider(HttpRequest.Builder) 中的参数 |
protected HttpRequest<java.lang.String> |
buildRequest(HttpRequest<java.lang.String> httpRequest)
构建请求 Request,默认直接返回
SessionCredentialProvider(HttpRequest) 中的参数 |
protected QCloudLifecycleCredentials |
fetchNewCredentials()
请求一个新的临时密钥
|
protected SessionQCloudCredentials |
parseServerResponse(java.lang.String jsonContent)
解析服务器返回的 json 数据,默认行为是解析 CAM 的标准返回格式
|
forceInvalidationCredential, getCredentials, refresh
public SessionCredentialProvider()
public SessionCredentialProvider(HttpRequest<java.lang.String> httpRequest)
public SessionCredentialProvider(HttpRequest.Builder<java.lang.String> requestBuilder)
public SessionCredentialProvider(HttpRequest<java.lang.String> httpRequest, SessionCredentialProvider.StsVersion stsVersion)
public SessionCredentialProvider(HttpRequest.Builder<java.lang.String> requestBuilder, SessionCredentialProvider.StsVersion stsVersion)
protected QCloudLifecycleCredentials fetchNewCredentials() throws QCloudClientException
BasicLifecycleCredentialProvider
fetchNewCredentials
在类中 BasicLifecycleCredentialProvider
QCloudClientException
- 如果请求超时或者失败,会抛出异常protected HttpRequest<java.lang.String> buildRequest(HttpRequest<java.lang.String> httpRequest)
SessionCredentialProvider(HttpRequest)
中的参数protected HttpRequest<java.lang.String> buildRequest(HttpRequest.Builder<java.lang.String> requestBuilder)
SessionCredentialProvider(HttpRequest.Builder)
中的参数protected SessionQCloudCredentials parseServerResponse(java.lang.String jsonContent) throws QCloudClientException
jsonContent
- 返回json数据QCloudClientException
- 获取签名出错的异常