lib/credentials/web_identity_credentials.js
function WebIdentityCredentials(params) {
    AWS.Credentials.call(this);
    this.expired = true;
    this.params = params;
    this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity';
    this.service = new AWS.STS({params: this.params});
    this.data = null;
  }
function WebIdentityCredentials(params) {
    AWS.Credentials.call(this);
    this.expired = true;
    this.params = params;
    this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity';
    this.service = new AWS.STS({params: this.params});
    this.data = null;
  }
Creates a new credentials object.
@param (see AWS.STS.assumeRoleWithWebIdentity)
@example Creating a new credentials object
AWS.config.credentials = new AWS.WebIdentityCredentials({
RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity',
WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service
RoleSessionName: 'web' // optional name, defaults to web-identity
});
@see AWS.STS.assumeRoleWithWebIdentity