lib/credentials/shared_ini_file_credentials.js
function SharedIniFileCredentials(options) {
    AWS.Credentials.call(this);

    options = options || {};

    this.filename = options.filename;
    this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile;
    this.disableAssumeRole = Boolean(options.disableAssumeRole);
    this.preferStaticCredentials = Boolean(options.preferStaticCredentials);
    this.tokenCodeFn = options.tokenCodeFn || null;
    this.httpOptions = options.httpOptions || null;
    this.get(options.callback || AWS.util.fn.noop);
  }
function SharedIniFileCredentials(options) {
    AWS.Credentials.call(this);

    options = options || {};

    this.filename = options.filename;
    this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile;
    this.disableAssumeRole = Boolean(options.disableAssumeRole);
    this.preferStaticCredentials = Boolean(options.preferStaticCredentials);
    this.tokenCodeFn = options.tokenCodeFn || null;
    this.httpOptions = options.httpOptions || null;
    this.get(options.callback || AWS.util.fn.noop);
  }
function SharedIniFileCredentials ( options ) { AWS . Credentials . call ( this ) ; options = options || { } ; this . filename = options . filename ; this . profile = options . profile || process . env . AWS_PROFILE || AWS . util . defaultProfile ; this . disableAssumeRole = Boolean ( options . disableAssumeRole ) ; this . preferStaticCredentials = Boolean ( options . preferStaticCredentials ) ; this . tokenCodeFn = options . tokenCodeFn || null ; this . httpOptions = options . httpOptions || null ; this . get ( options . callback || AWS . util . fn . noop ) ; }
Creates a new SharedIniFileCredentials object.

@param options [map] a set of options
@option options profile [String] (AWS_PROFILE env var or 'default')
the name of the profile to load.
@option options filename [String] ('~/.aws/credentials' or defined by
AWS_SHARED_CREDENTIALS_FILE process env var)
the filename to use when loading credentials.
@option options disableAssumeRole [Boolean] (false) True to disable
support for profiles that assume an IAM role. If true, and an assume
role profile is selected, an error is raised.
@option options preferStaticCredentials [Boolean] (false) True to
prefer static credentials to role_arn if both are present.
@option options tokenCodeFn [Function] (null) Function to provide
STS Assume Role TokenCode, if mfa_serial is provided for profile in ini
file. Function is called with value of mfa_serial and callback, and
should provide the TokenCode or an error to the callback in the format
callback(err, token)
@option options callback [Function] (err) Credentials are eagerly loaded
by the constructor. When the callback is called with no error, the
credentials have been loaded successfully.
@option options httpOptions [map] A set of options to pass to the low-level
HTTP request. Currently supported options are:
* **proxy** [String] &mdash; the URL to proxy requests through
* **agent** [http.Agent, https.Agent] &mdash; the Agent object to perform
HTTP requests with. Used for connection pooling. Defaults to the global
agent (`http.globalAgent`) for non-SSL connections. Note that for
SSL connections, a special Agent object is used in order to enable
peer certificate verification. This feature is only available in the
Node.js environment.
* **connectTimeout** [Integer] &mdash; Sets the socket to timeout after
failing to establish a connection with the server after
`connectTimeout` milliseconds. This timeout has no effect once a socket
connection has been established.
* **timeout** [Integer] &mdash; Sets the socket to timeout after timeout
milliseconds of inactivity on the socket. Defaults to two minutes
(120000).
Creates a new SharedIniFileCredentials object .