title: Zend Framework 2 Remember Me without Custom Code
body: <p>I do authentication using Zend Framework 2. The code follows documentation 
  <a href="http://framework.zend.com/manual/2.3/en/modules/zend.authentication.intro.html" rel="nofollow">Introduction to Zend\Authentication</a></p>
  
  <pre><code>use Zend\Authentication\AuthenticationService;
  use Zend\Authentication\Adapter\Digest as AuthAdapter;
  ...
  $authService = new AuthenticationService();
  $authAdapter = new AuthAdapter($passwordFile, $realm, $username, $password);
  $result = $authService-&gt;authenticate($authAdapter);
  </code></pre>
  
  <blockquote>
    <p>By default, <code>Zend\Authentication</code> provides persistent storage of the identity from a successful authentication attempt using the PHP session.</p>
  </blockquote>
  
  <p>I want to configure persistent storage to keep data for 1 week (if user checks the 'remember me' check box). I don't want to develop custom storage class.</p>
  
  <p>How the 'remember me' feature might be implemented using existing Zend Framework 2 code?</p>
  
  <p>I think extending session live time is not a perfect solution. We should keep some information about user in a cookie. Is it possible to configure Zend Framework to retrieve information from saved cookie and use it for authentication?</p>
  
  <p>P.S. I do know how to write custom storage class but I want to throw away any additional custom code. The less code we have the less we should support.</p>