Category: symfony-security

Could not resolve argument $encoder of "xx", UserPasswordEncoderInterface, Symfony 4.*

I’m trying to encode the password im passing through post but it is giving me an error when I declare the argument in the function. Could not resolve argument $encoder of “AppControllerUsuarioController::altapropietario()”, maybe you forgot to register the controller as…

How do I require authentication for POST requests but allow unathenticated use for GET requests on my token-secured API?

I have REST API and I want a certain route on which requests are GET to be public, but I want POST request to require a token. Example: // config/packages/security.yaml security: # … firewalls: api: pattern: ^/api/v1/ // here I…