lib/common/services/storageserviceclient.js
function StorageServiceClient(storageAccount, storageAccessKey, host, usePathStyleUri, sas, token) {
  StorageServiceClient['super_'].call(this);

  if(storageAccount && storageAccessKey) {
    // account and key
    this.storageAccount = storageAccount;
    this.storageAccessKey = storageAccessKey;
    this.storageCredentials = new SharedKey(this.storageAccount, this.storageAccessKey, usePathStyleUri);
  } else if (sas) {
    // sas
    this.sasToken = sas;
    this.storageCredentials = new SharedAccessSignature(sas);
  } else if (token) {
    // access token
    this.token = token;
    this.storageCredentials = new TokenSigner(token);
  } else {
    // anonymous
    this.anonymous = true;
    this.storageCredentials = {
      signRequest: function(webResource, callback){
        // no op, anonymous access
        callback(null);
      }
    };
  }

  if(host){
    this.setHost(host);
  }

  this.apiVersion = HeaderConstants.TARGET_STORAGE_VERSION;
  this.usePathStyleUri = usePathStyleUri;

  this._initDefaultFilter();

  /**
   * The logger of the service. To change the log level of the services, set the `[logger.level]{@link Logger#level}`.
   * @name StorageServiceClient#logger
   * @type Logger
   * */
  this.logger = new Logger(Logger.LogLevels.INFO);

  this._setDefaultProxy();

  this.xml2jsSettings = StorageServiceClient._getDefaultXml2jsSettings();
  this.defaultLocationMode = StorageUtilities.LocationMode.PRIMARY_ONLY;
}
function StorageServiceClient(storageAccount, storageAccessKey, host, usePathStyleUri, sas, token) {
  StorageServiceClient['super_'].call(this);

  if(storageAccount && storageAccessKey) {
    // account and key
    this.storageAccount = storageAccount;
    this.storageAccessKey = storageAccessKey;
    this.storageCredentials = new SharedKey(this.storageAccount, this.storageAccessKey, usePathStyleUri);
  } else if (sas) {
    // sas
    this.sasToken = sas;
    this.storageCredentials = new SharedAccessSignature(sas);
  } else if (token) {
    // access token
    this.token = token;
    this.storageCredentials = new TokenSigner(token);
  } else {
    // anonymous
    this.anonymous = true;
    this.storageCredentials = {
      signRequest: function(webResource, callback){
        // no op, anonymous access
        callback(null);
      }
    };
  }

  if(host){
    this.setHost(host);
  }

  this.apiVersion = HeaderConstants.TARGET_STORAGE_VERSION;
  this.usePathStyleUri = usePathStyleUri;

  this._initDefaultFilter();

  /**
   * The logger of the service. To change the log level of the services, set the `[logger.level]{@link Logger#level}`.
   * @name StorageServiceClient#logger
   * @type Logger
   * */
  this.logger = new Logger(Logger.LogLevels.INFO);

  this._setDefaultProxy();

  this.xml2jsSettings = StorageServiceClient._getDefaultXml2jsSettings();
  this.defaultLocationMode = StorageUtilities.LocationMode.PRIMARY_ONLY;
}
function StorageServiceClient ( storageAccount , storageAccessKey , host , usePathStyleUri , sas , token ) { StorageServiceClient [ 'super_' ] . call ( this ) ; if ( storageAccount && storageAccessKey ) { // account and key this . storageAccount = storageAccount ; this . storageAccessKey = storageAccessKey ; this . storageCredentials = new SharedKey ( this . storageAccount , this . storageAccessKey , usePathStyleUri ) ; } else if ( sas ) { // sas this . sasToken = sas ; this . storageCredentials = new SharedAccessSignature ( sas ) ; } else if ( token ) { // access token this . token = token ; this . storageCredentials = new TokenSigner ( token ) ; } else { // anonymous this . anonymous = true ; this . storageCredentials = { signRequest : function ( webResource , callback ) { // no op, anonymous access callback ( null ) ; } } ; } if ( host ) { this . setHost ( host ) ; } this . apiVersion = HeaderConstants . TARGET_STORAGE_VERSION ; this . usePathStyleUri = usePathStyleUri ; this . _initDefaultFilter ( ) ; /**
   * The logger of the service. To change the log level of the services, set the `[logger.level]{@link Logger#level}`.
   * @name StorageServiceClient#logger
   * @type Logger
   * */ this . logger = new Logger ( Logger . LogLevels . INFO ) ; this . _setDefaultProxy ( ) ; this . xml2jsSettings = StorageServiceClient . _getDefaultXml2jsSettings ( ) ; this . defaultLocationMode = StorageUtilities . LocationMode . PRIMARY_ONLY ; }
Creates a new StorageServiceClient object.

@class
The StorageServiceClient class is the base class of all the service classes.
@constructor
@param {string} storageAccount           The storage account.
@param {string} storageAccessKey         The storage access key.
@param {object} host                     The host for the service.
@param {bool}   usePathStyleUri          Boolean value indicating wether to use path style uris.
@param {string} sas                      The Shared Access Signature string.
@param {TokenCredential} [token]         The {@link TokenCredential} object, which can be created with an OAuth access token string.
Creates a new StorageServiceClient object .