code: function fromHeaderOrQuerystring(req) {
    if (req.headers.authorization && req.headers.authorization.split(' ')[0] === 'Bearer') {
      return req.headers.authorization.split(' ')[1];
    } else if (req.query && req.query.token) {
      return req.query.token;
    }
    return false;
  }
docs: Extracts a JWT from a request header or query string
  @param  {Object} req the request object
  @return {string}     the token