*/
protected void verifyAuthenticationStatement(AuthnStatement auth, RequestedAuthnContext requestedAuthnContext, SAMLMessageContext context) throws AuthenticationException {
// Validate that user wasn't authenticated too long time ago
if (!isDateTimeSkewValid(getResponseSkew(), getMaxAuthenticationAge(), auth.getAuthnInstant())) {
throw new CredentialsExpiredException("Authentication statement is too old to be used with value " + auth.getAuthnInstant());
}
// Validate users session is still valid
if (auth.getSessionNotOnOrAfter() != null && auth.getSessionNotOnOrAfter().isBeforeNow()) {
throw new CredentialsExpiredException("Authentication session is not valid on or after " + auth.getSessionNotOnOrAfter());
}
// Verify context
verifyAuthnContext(requestedAuthnContext, auth.getAuthnContext(), context);