public class ShortTimeCredentialProvider extends BasicLifecycleCredentialProvider
SessionCredentialProvider
SDK 示例:方式三:通过永久密钥进行授权(不推荐)
构造器和说明 |
---|
ShortTimeCredentialProvider(java.lang.String secretId,
java.lang.String secretKey,
long keyDuration)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
protected QCloudLifecycleCredentials |
fetchNewCredentials()
请求一个新的临时密钥
|
long |
getDuration() |
java.lang.String |
getSecretId() |
java.lang.String |
getSecretKey() |
forceInvalidationCredential, getCredentials, refresh
@Deprecated public ShortTimeCredentialProvider(java.lang.String secretId, java.lang.String secretKey, long keyDuration)
protected QCloudLifecycleCredentials fetchNewCredentials() throws QCloudClientException
BasicLifecycleCredentialProvider
fetchNewCredentials
在类中 BasicLifecycleCredentialProvider
QCloudClientException
- 如果请求超时或者失败,会抛出异常public java.lang.String getSecretKey()
public java.lang.String getSecretId()
public long getDuration()