Class StaticTokenProvider
public class StaticTokenProvider : IAWSTokenProvider
- Inheritance
-
StaticTokenProvider
- Implements
- Inherited Members
Constructors
StaticTokenProvider(string, DateTime?)
Creates a new StaticTokenProvider that can be assigned to AWSTokenProvider or added to a AWSTokenProviderChain.
public StaticTokenProvider(string token, DateTime? expiration = null)
Parameters
tokenstringBearer token to use to authorize AWS SDK requests.
expirationDateTime?An optional DateTime in UTC for which
tokenwill no longer be valid. Attempting to retrievetokenafterexpirationwill cause a AmazonClientException to be thrown.
Methods
TryResolveTokenAsync(CancellationToken)
Attempts to load an AWSToken.
NOTE: In some extreme circumstances, providers may throw an exception.public Task<TryResponse<AWSToken>> TryResolveTokenAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken