I'd like to understand how the security work with user providers. In security.yaml I can write :
providers:
entity_provider:
entity:
class: App\Entity\User
property: userLogin
...
firewalls:
...
json_login:
username_path: userLogin
And thus define "userLogin" as the proper field to use as "user name" for authentication. Is that correct? Then, why does it seems like my User class has to implement Symfony\Component\Security\Core\User\UserInterface::getUsername() ? What's supposed to happen if those functions return something different from the conf? In which cases one will be used and not the others?