title: symfony4 UserProviderInterface implementation with api calls authentification
body: <p>I'm developing a symfony4 webapp. Users accounts are stored on a DB accessible via an API.</p>
  
  <p>I want to implement this <a href="https://github.com/symfony/security-core/blob/master/User/UserProviderInterface.php" rel="nofollow noreferrer">UserProviderInterface</a> as it is <a href="https://symfony.com/doc/current/security/form_login_setup.html" rel="nofollow noreferrer">advised by the symfony4 documentation</a> to use the symfony4 security module features.</p>
  
  <p>If I understand, implementing this interface requires the API (or service, or db...) to return data (for example hashed password / salt) that will be checked by symfony security.</p>
  
  <p>Is there a way to use the symfony security module without getting such data from the user provider ?</p>
  
  <p>For example to send username and password entered in login form by the user to the api, which will check if it is correct and return a bool ?</p>