title: How to inject the in-memory user provider into a service?
body: <p>I'm following <a href="http://symfony.com/doc/current/cookbook/security/voters.html">http://symfony.com/doc/current/cookbook/security/voters.html</a> and attempting to make a custom voter that denies access for requests that don't contain a valid API key and digest in the header (influenced by <a href="http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html">http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html</a> - I'm not building an authentication provider because I need to use the FOSUserBundle provider for the same request).</p>
  
  <p>I'd like to store my api keys / secrets in the in-memory user provider to begin with and likely migrate this to a custom mongodb provider at a later date. So I need a way of injecting the user provider into my voter. I've already injected the service container, but can the user providers can be accessed from it?</p>
  
  <p>My service definition:</p>
  
  <pre><code>services:
      security.access.api_client_voter:
          class:     Acme\RestBundle\Security\Authorization\Voter\ApiClientVoter
          arguments: [@service_container, %kernel.cache_dir%/security/nonces]
          public:    false
          tags:
              - { name: monolog.logger, channel: authentication }
              - { name: security.voter }
  </code></pre>
  
  <p>So my question is, how do I inject the in-memory provider? The WSSE example in the cookbook seems to use an auth provider factory to replace the string 'security.providers.in_memory', but as I'm just using a voter, is this necessary? If it is necessary, what would my factory look like?</p>