title: Spring security Saml - Time difference between SP and IDP
body: <p>I am looking for a way to increase the expiration time of my saml messages. I use Spring Security with SAML 1.0.0-RC2.</p>
  
  <p>At this moment, if the servers** time are too different, e.g. 5 minutes, I got following error:</p>
  
  <pre><code>HTTP Status 401 - Authentication Failed:Error validating SAML message: SAML response is not valid; nested exception is org.opensaml.common.SAMLException: SAML response is not valid
  </code></pre>
  
  <p>I want to set the expiration time to 10 minutes, to prevent those errors. I have been looking at the documentation, but I don't understand how to change the expiration time. If I look at the <a href="http://docs.spring.io/spring-security-saml/docs/1.0.x/reference/html/configuration-sso.html#configuration-authentication-object" rel="nofollow noreferrer">Configuration authentication object</a> section, one would be able to change the expiration time but I fail to grasp the idea.</p>
  
  <p>Could somebody help me out?</p>
  
  <p>** My server (SP) and server of the customer (IDP, most likely a server with ADFS installed).</p>