The documentation Symfony\Component\HttpFoundation\Request how to use Symfony\Component\HttpFoundation\Request in the controller. A self-signed authenticator is not needed for this.
We substitute a typhint in the method, and the symphony itself injects
use Symfony\Component\HttpFoundation\Request; //... public function indexAction(Request $request) { // ... }
We get the parameters from the request:
$username = $request->request->get('username'); $password = $request->request->get('password');
The request property is the body of a POST / PUT / PATCH request in the form of an associative array.
If you are trying to find out the password of the user who made the request and did not send the password with this request, you have incorrectly designed your application. No need to store real user passwords.