verifyAuthenticated = async (funcLogger, authToken) => {
  const logger = funcLogger.child({ tag: 'verifyAuthenticated' });

  const authenticationEnabled = config.get('authentication.enabled');
  if (authenticationEnabled === false) {
    logger.info('Authentication is not enabled.');
    return true;
  }

  const jwtSecret = await cache.get('auth-jwt-secret');

  logger.info({ authToken, jwtSecret }, 'Verifying authentication');
  let data = null;
  try {
    data = jwt.verify(authToken, jwtSecret, { algorithm: 'HS256' });
  } catch (err) {
    logger.info({ err }, 'Failed authentication');
    return false;
  }

  logger.info({ data }, 'Success authentication');
  return true;
}
Verify authentication

@param {*} funcLogger
@param {*} authToken
@returns