You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use.
For more information, see the
Migration Guide and
API Reference.
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