title: Code for Silex check_path to validate a user login
body: <p>I am currently following the Silex tutorial on <a href="http://silex.sensiolabs.org/doc/providers/security.html" rel="nofollow">Security Service Provider</a>. </p>
  
  <p>I have the login form working, with my check_path set to /login_check using this code:</p>
  
  <pre class="lang-php prettyprint-override"><code>$app-&gt;register(new Silex\Provider\SecurityServiceProvider(), array(
      'security.firewalls' =&gt; array(
          'admin' =&gt; array(
              'pattern' =&gt; '^/contacts/add',
              'form' =&gt; array('login_path' =&gt; '/login', 'check_path' =&gt; '/login_check'),
              'users' =&gt; array(
                  'admin' =&gt; array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
              ),
          )
      )
  ));
  </code></pre>
  
  <p>However, I do not know how to validate a user login in silex as there is no example code for login_check:</p>
  
  <pre class="lang-php prettyprint-override"><code>$app-&gt;post('/login_check', function(Request $request) use ($app) {
      // What now??
  });
  </code></pre>