AWS.StaticTokenProvider — AWS SDK for JavaScript (original) (raw)

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.

Overview

Represents the simplest token provider. It returns a static token string and has an optional expireTime.

Constructor Summarycollapse

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