Update error messages in Authenticate.php for clarity

This commit is contained in:
netkas 2025-01-10 18:18:17 -05:00
parent 9e9596989d
commit 72a6aaec5b

View file

@ -23,12 +23,12 @@
{ {
if(!$request->getPeer()->isExternal()) if(!$request->getPeer()->isExternal())
{ {
return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Only external peers can authenticate'); return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Only external peers can authenticate using this method');
} }
if($request->getSession()->isAuthenticated()) if($request->getSession()->isAuthenticated())
{ {
return $rpcRequest->produceError(StandardError::FORBIDDEN, 'Peer is already authenticated'); return $rpcRequest->produceError(StandardError::FORBIDDEN, 'External host is already authenticated');
} }
SessionManager::updateFlow($request->getSession(), [SessionFlags::AUTHENTICATION_REQUIRED]); SessionManager::updateFlow($request->getSession(), [SessionFlags::AUTHENTICATION_REQUIRED]);