title: Symfony2 - Unrecognized option "entity" under "security.providers.db_users"
body: <p>I'm implementing a user authentication for my project (an API) where the login will be done using oAuth third parties (Facebook and Google+).</p>
  
  <p>My project is using MongoDb and Doctrine MongoDB Odm.</p>
  
  <p>For reach this objective I've created a User Document:</p>
  
  <pre><code>class User implements UserInterface, \Serializable
  {
      protected $id;
      protected $provider;
      protected $providerId;
      protected $name;
      protected $email;
      protected $image;
      protected $roles = array('ROLE_USER');
      protected $isActive = true;
      protected $createdAt;
      protected $updatedAt;
  
      public function getId() {
          return $this-&gt;id;
      }
  
      /******* MORE GETTERS AND SETTERS. ********/
  
      public function eraseCredentials()
      {
      }
  
      /** @see \Serializable::serialize() */
      public function serialize()
      {
          return serialize(array(
              $this-&gt;id,
              $this-&gt;email,
              $this-&gt;getPassword(),
              $this-&gt;isActive
          ));
      }
  
      /** @see \Serializable::unserialize() */
      public function unserialize($serialized)
      {
          list (
              $this-&gt;id,
              $this-&gt;email,
              $this-&gt;password,
              $this-&gt;isActive
              ) = unserialize($serialized);
      }
  }
  </code></pre>
  
  <p>With this YAML config file:</p>
  
  <pre><code>AppBundle\Document\User:
      type: document
      db: db_name
      collection: user
      repositoryClass: AppBundle\Repository\UserRepository
      fields:
          id:
              type: id
              id:  true
              strategy: AUTO
          provider:
              type: string
          providerId:
              type: string
          name:
              type: string
          email:
              type: string
          image:
              type: string
          roles:
              type: collection
          isActive:
              type: boolean
          createdAt:
              type: timestamp
          updatedAt:
              type: timestamp
  </code></pre>
  
  <p>And this security.yml configuration:</p>
  
  <pre><code>security:
      encoders:
          AppBundle\Document\User: { algorithm: sha512, iterations: 10 }
  
      role_hierarchy:
          ROLE_ADMIN:       ROLE_USER
          ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN]
  
      providers:
          db_users:
              entity: { class: AppBundle\Document\User, property: email }
  
      firewalls:
          dev:
              pattern: ^/(_(profiler|wdt|error)|css|images|js)/
              security: false
          default:
              pattern:    ^/
              provider:   db_users
  
      access_control:
          - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  </code></pre>
  
  <p>And when I execute the code, I get the next error:</p>
  
  <pre><code>Unrecognized option "entity" under "security.providers.db_users"
  </code></pre>
  
  <p>¿Am I missing something?</p>