/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { AuthnStatement authnStatement = (AuthnStatement) samlObject; if (attribute.getLocalName().equals(AuthnStatement.AUTHN_INSTANT_ATTRIB_NAME) && !Strings.isNullOrEmpty(attribute.getValue())) { authnStatement.setAuthnInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC())); } else if (attribute.getLocalName().equals(AuthnStatement.SESSION_INDEX_ATTRIB_NAME)) { authnStatement.setSessionIndex(attribute.getValue()); } else if (attribute.getLocalName().equals(AuthnStatement.SESSION_NOT_ON_OR_AFTER_ATTRIB_NAME) && !Strings.isNullOrEmpty(attribute.getValue())) { authnStatement.setSessionNotOnOrAfter(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC())); } else { super.processAttribute(samlObject, attribute); } } }
final Long lifetime = sessionLifetimeLookupStrategy.apply(profileRequestContext); if (lifetime != null && lifetime > 0) { statement.setSessionNotOnOrAfter(new DateTime().plus(lifetime));
if (assertion.getValidUntilDate() != null) { val dt = DateTimeUtils.zonedDateTimeOf(assertion.getValidUntilDate()); statement.setSessionNotOnOrAfter( DateTimeUtils.dateTimeOf(dt.plusSeconds(casProperties.getAuthn().getSamlIdp().getResponse().getSkewAllowance())));
authnStatement.setSessionNotOnOrAfter(sessionNotOnOrAfter);
a.getAuthnStatements().add(authnStatement); authnStatement.setSessionIndex(stmt.getSessionIndex()); authnStatement.setSessionNotOnOrAfter(stmt.getSessionNotOnOrAfter()); authnStatement.setAuthnInstant(stmt.getAuthInstant());