function parseHeaders(req) {
  if (req.headers && req.headers.authorization) {
    const parts = req.headers.authorization.split(' ');

    if (parts.length === 2) {
      const scheme = parts[0];
      const credentials = parts[1];

      if (/^Bearer$/i.test(scheme)) {
        return credentials;
      }
    }
  }
}
/**
 * Parses bearer token from the Authorization header
 *
 * @param req {Object} The incoming Connect request
 * @returns {String} The bearer token
 * @private
 */
Parses bearer token from the Authorization header
@param req {Object} The incoming Connect request
@returns {String} The bearer token
@private
Parses bearer token from the Authorization header @param req { Object } The incoming Connect request @returns { String } The bearer token @private
function parseHeaders(req) {
  if (req.headers && req.headers.authorization) {
    const parts = req.headers.authorization.split(' ');
    if (parts.length === 2) {
      const scheme = parts[0];
      const credentials = parts[1];
      if (/^Bearer$/i.test(scheme)) {
        return credentials;
      }
    }
  }
}
function parseHeaders ( req ) { if ( req . headers && req . headers . authorization ) { const parts = req . headers . authorization . split ( ' ' ) ; if ( parts . length === 2 ) { const scheme = parts [ 0 ] ; const credentials = parts [ 1 ] ; if ( / ^Bearer$ / i . test ( scheme ) ) { return credentials ; } } } }
Parses bearer token from the Authorization header
 @param req {Object} The incoming Connect request
 @returns {String} The bearer token
 @private
Parses bearer token from the Authorization header @param req { Object } The incoming Connect request @returns { String } The bearer token @private