Пример #1
0
 public void RefreshCredential()
 {
     if (WithShouldRefresh())
     {
         RamRoleArnCredential credential = GetNewCredential <RamRoleArnCredential>();
         this.expiration      = credential.GetExpiration();
         this.accessKeyId     = credential.GetAccessKeyId();
         this.accessKeySecret = credential.GetAccessKeySecret();
         this.securityToken   = credential.GetSecurityToken();
     }
 }
Пример #2
0
 public void RefreshCredential()
 {
     if (WithShouldRefresh())
     {
         RamRoleArnCredential credential = GetNewCredential();
         this.expiration      = credential.Expiration;
         this.accessKeyId     = credential.AccessKeyId;
         this.accessKeySecret = credential.AccessKeySecret;
         this.securityToken   = credential.SecurityToken;
     }
 }
Пример #3
0
        public async Task RefreshCredentialAsync()
        {
            if (WithShouldRefresh())
            {
                RamRoleArnCredential credential = await GetNewCredentialAsync <RamRoleArnCredential>();

                this.expiration = await credential.GetExpirationAsync();

                this.accessKeyId = await credential.GetAccessKeyIdAsync();

                this.accessKeySecret = await credential.GetAccessKeySecretAsync();

                this.securityToken = await credential.GetSecurityTokenAsync();
            }
        }