Exemplo n.º 1
0
 public void RefreshCredential()
 {
     if (WithShouldRefresh())
     {
         RsaKeyPairCredential credential = GetNewCredential <RsaKeyPairCredential>();
         this.publicKeyId      = credential.GetAccessKeyId();
         this.expiration       = credential.GetExpiration();
         this.privateKeySecret = credential.GetAccessKeySecret();
     }
 }
Exemplo n.º 2
0
        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();
            }
        }