title: How to set the session timeout in Zend Framework 2
body: <p>I don't have much Zend experience and want to change someone's login code in Zend to make the session not expire.</p>
  
  <p>It seems the code is basic behavior:</p>
  
  <pre><code>    $adapter = $this-&gt;getAuthService()-&gt;getAdapter();
      $adapter-&gt;setIdentity($email)-&gt;setCredential($password);
  
      $result = $this-&gt;getAuthService()-&gt;authenticate();
  </code></pre>
  
  <p>What do I have to do to make the session not expire or to at least set the session for a specific time?</p>
  
  <p>Right now the user doesn't stay logged in for long, I think perhaps it is just relying on default php settings behavior like the standard 24 minutes for the gc_maxlifetime.</p>
  
  <p>What is the connection between Zend_Session and AuthService?</p>