title: Session validation failed ZF3
body: <p>In the mobile application, we are using API which is made using Zend Framework. Whenever a user tries to get the login to the app, they get authenticated using the JWT token.</p>
  
  <p>But sometimes Zf3 gives exceptions as:</p>
  
  <p><strong>Service with name \"Zend\Authentication\AuthenticationService\" could not be created. Reason: Session validation failed...</strong></p>
  
  <p>We have checked all the working scenarios but we failed to find the cause of the problem.</p>
  
  <p>Below is the request header for the API:</p>
  
  <pre><code>{
      "Accept-Language" = "en;q=1";
  
      Authorization = "Bearer ***********ciOiJIUzU***RoX3Rva2VuIjoiMDh3d1hKSTc1MzAzOVh2NTV2eUx2dXBLIiwidXNlciI6MiwidG9rZW4iOiJhVGZsQmRp***R0dmSGlNbW80Q0d3OGJaNyIsImFwaV92ZXJzaW9uIjo*******H******5R5QPv09OjPcMoL3GlQ9IvcdU****7Q3sQHA";
  
      "Content-Type" = "application/x-www-form-urlencoded";
  
      Device = 1;
  
      Timezone = "+05:30";
  
      "User-Agent" = "****/*.0.2 (iPhone; iOS 10.3.1; Scale/2.00)"; (appname replaced with *)
  
      Version = 1;
  }
  </code></pre>