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
ScopeLimitCredentialProvider
getCredentials
在接口中 ScopeLimitCredentialProvider
credentialScope
- 权限范围QCloudClientException
- 如果请求超时或者失败,会抛出异常public void refresh()
QCloudCredentialProvider
refresh
在接口中 QCloudCredentialProvider
public QCloudCredentials getCredentials() throws QCloudClientException
QCloudCredentialProvider
getCredentials
在接口中 QCloudCredentialProvider
QCloudClientException
protected abstract SessionQCloudCredentials fetchNewCredentials(STSCredentialScope[] credentialScope) throws QCloudClientException
credentialScope
- 当前申请的密钥需要的最小权限QCloudClientException
- 如果请求超时或者失败,会抛出异常