code: function (entity, options) {
          var type,
              result,
              self = this,
              auth = self.cleanAuth(entity, options);
  
          if (!auth) { return auth; }
  
          result = { type: (type = auth.type) };
  
          if (type !== 'noauth') {
              result[type] = _.transform(auth[type], function (result, param) {
                  result[param.key] = param.value;
              }, {});
          }
  
          return result;
      }
docs: Transforms an array of auth params to their object equivalent.
  
  @param {Object} entity - The wrapper object for the array of auth params.
  @param {?Object} options - The set of options for the current auth cleansing operation.
  @param {?Boolean} [options.excludeNoauth=false] - When set to true, noauth is set to null.
  @returns {*}