We announced the upcoming
end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3.
For dates, additional details, and information on how to migrate, please refer to the linked announcement.
Class: AWS.StaticTokenProvider
- Defined in:
- lib/token/static_token_provider.js
Overview
Represents the simplest token provider. It returns a static token string and has an optional expireTime.
Constructor Summary collapse
-
new AWS.StaticTokenProvider(options) ⇒ void
constructor
Creates a new StaticTokenProvider class with a given token and optional expireTime.
Property Summary
Properties inherited from AWS.Token
token, expireTime, expired, expiryWindow
Method Summary
Methods inherited from AWS.Token
needsRefresh, get, getPromise, refreshPromise, refresh
Constructor Details
new AWS.StaticTokenProvider(options) ⇒ void
Creates a new StaticTokenProvider class with a given AWS.StaticTokenProvider.token and optional AWS.StaticTokenProvider.expireTime.
var staticTokenProvider = new AWS.StaticTokenProvider({
token: 'token'
});
staticTokenProvider.token == 'token' // from constructor