public class STSScopeLimitCredentialProvider extends BasicScopeLimitCredentialProvider
构造器和说明 |
---|
STSScopeLimitCredentialProvider(HttpRequest.Builder<java.lang.String> requestBuilder)
实例化一个 STSScopeLimitCredentialProvider
|
限定符和类型 | 方法和说明 |
---|---|
protected HttpRequest<java.lang.String> |
buildRequest(HttpRequest.Builder<java.lang.String> requestBuilder)
构建请求 Request,默认直接返回
STSScopeLimitCredentialProvider(HttpRequest.Builder) 中的参数 |
SessionQCloudCredentials |
fetchNewCredentials(STSCredentialScope[] credentialScope)
根据权限,请求一个新的临时密钥
|
protected SessionQCloudCredentials |
parseServerResponse(java.lang.String jsonContent)
解析服务器返回的 json 数据,默认行为是解析 CAM 的标准返回格式
|
getCredentials, getCredentials, refresh
public STSScopeLimitCredentialProvider(HttpRequest.Builder<java.lang.String> requestBuilder)
public SessionQCloudCredentials fetchNewCredentials(STSCredentialScope[] credentialScope) throws QCloudClientException
BasicScopeLimitCredentialProvider
fetchNewCredentials
在类中 BasicScopeLimitCredentialProvider
credentialScope
- 当前申请的密钥需要的最小权限QCloudClientException
- 如果请求超时或者失败,会抛出异常protected HttpRequest<java.lang.String> buildRequest(HttpRequest.Builder<java.lang.String> requestBuilder)
STSScopeLimitCredentialProvider(HttpRequest.Builder)
中的参数protected SessionQCloudCredentials parseServerResponse(java.lang.String jsonContent) throws QCloudClientException
jsonContent
- 返回json数据QCloudClientException
- 获取签名出错的异常