docs: function parseBasic(string) {
      var decoded;
      var index;
      var pieces;
  
      decoded = (new Buffer(string, 'base64')).toString('utf8');
  
      if (!decoded) {
          throw new InvalidHeaderError('Authorization header invalid');
      }
  
      index = decoded.indexOf(':');
  
      if (index === -1) {
          pieces = [decoded];
      } else {
          pieces = [decoded.slice(0, index), decoded.slice(index + 1)];
      }
  
      if (!pieces || typeof (pieces[0]) !== 'string') {
          throw new InvalidHeaderError('Authorization header invalid');
      }
  
      // Allows for usernameless authentication
      if (!pieces[0]) {
          pieces[0] = null;
      }
  
      // Allows for passwordless authentication
      if (!pieces[1]) {
          pieces[1] = null;
      }
  
      return ({
          username: pieces[0],
          password: pieces[1]
      });
  }