public void RefreshCredential() { if (WithShouldRefresh()) { RsaKeyPairCredential credential = GetNewCredential <RsaKeyPairCredential>(); this.publicKeyId = credential.GetAccessKeyId(); this.expiration = credential.GetExpiration(); this.privateKeySecret = credential.GetAccessKeySecret(); } }
public async Task RefreshCredentialAsync() { if (WithShouldRefresh()) { RsaKeyPairCredential credential = await GetNewCredentialAsync <RsaKeyPairCredential>(); this.expiration = await credential.GetExpirationAsync(); this.publicKeyId = await credential.GetAccessKeyIdAsync(); this.privateKeySecret = await credential.GetAccessKeySecretAsync(); } }