title: Login info using symfony and user provider
body: <p>I'd like to understand how the security work with user providers. In security.yaml I can write :</p>
  
  <pre><code>   providers:
         entity_provider:
             entity:
                 class: App\Entity\User
                 property: userLogin
  ...
     firewalls:
  ...
             json_login:
                 username_path: userLogin
  </code></pre>
  
  <p>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 <code>Symfony\Component\Security\Core\User\UserInterface::getUsername()</code> ? 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?</p>