auth->setRequest($request)->getToken()) { return $this->respond('tymon.jwt.absent', 'token_not_provided', 401); } $user = $this->auth->authenticate($token); if (!$user) { return $this->respond('tymon.jwt.user_not_found', 'user_not_found', 401); } $this->events->dispatch('tymon.jwt.valid', $user); return $next($request); } }