request = $request; $this->actionFactory = $actionFactory; $this->metadataFactory = $metadataFactory; } public function afterGrantAccess(TfaSessionInterface $subject) { $metadata = $this->metadataFactory->create([ 'request' => $this->request, 'eventName' => MetadataInterface::EVENT_LOGIN ]); $actionHandler = $this->actionFactory->create($metadata); $actionHandler->execute(); } }