示例#1
0
 public AlibabaCloudCredentials GetCredentials()
 {
     if (credentials == null || credentials.WillSoonExpire())
     {
         credentials = GetNewSessionCredentials();
     }
     return(credentials);
 }
        public async Task <AlibabaCloudCredentials> GetCredentialsAsync(CancellationToken cancellationToken)
        {
            if (credentials == null || credentials.WillSoonExpire())
            {
                credentials = await GetNewSessionCredentialsAsync().ConfigureAwait(false);
            }

            return(credentials);
        }