public abstract class BasicScopeLimitCredentialProvider extends java.lang.Object implements ScopeLimitCredentialProvider
| 构造器和说明 |
|---|
BasicScopeLimitCredentialProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract SessionQCloudCredentials |
fetchNewCredentials(STSCredentialScope[] credentialScope)
根据权限,请求一个新的临时密钥
|
QCloudCredentials |
getCredentials()
Returns QCloudCredentials which the caller can use to authorize an QCloud
request.
|
SessionQCloudCredentials |
getCredentials(STSCredentialScope[] credentialScope)
可以根据权限范围,返回一个合适的临时密钥。
|
void |
refresh()
Forces this credentials provider to refresh its credentials.
|
public SessionQCloudCredentials getCredentials(STSCredentialScope[] credentialScope) throws QCloudClientException
ScopeLimitCredentialProvidergetCredentials 在接口中 ScopeLimitCredentialProvidercredentialScope - 权限范围QCloudClientException - 如果请求超时或者失败,会抛出异常public void refresh()
QCloudCredentialProviderrefresh 在接口中 QCloudCredentialProviderpublic QCloudCredentials getCredentials() throws QCloudClientException
QCloudCredentialProvidergetCredentials 在接口中 QCloudCredentialProviderQCloudClientExceptionprotected abstract SessionQCloudCredentials fetchNewCredentials(STSCredentialScope[] credentialScope) throws QCloudClientException
credentialScope - 当前申请的密钥需要的最小权限QCloudClientException - 如果请求超时或者失败,会抛出异常