/** * Validates that the authentication statement has an authentication instant. * * @param authenticationStatement the statement to validate * * @throws ValidationException thrown if the statement does not have an authentication instant */ protected void validateAuthenticationInstant(AuthenticationStatement authenticationStatement) throws ValidationException { if (authenticationStatement.getAuthenticationInstant() == null) { throw new ValidationException("No authenticationInstant present"); } } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { AuthenticationStatement authenticationStatement = (AuthenticationStatement) samlElement; if (authenticationStatement.getAuthenticationMethod() != null) { domElement.setAttributeNS(null, AuthenticationStatement.AUTHENTICATIONMETHOD_ATTRIB_NAME, authenticationStatement.getAuthenticationMethod()); } if (authenticationStatement.getAuthenticationInstant() != null) { String value = Configuration.getSAMLDateFormatter().print( authenticationStatement.getAuthenticationInstant()); domElement.setAttributeNS(null, AuthenticationStatement.AUTHENTICATIONINSTANT_ATTRIB_NAME, value); } } }
DateTime authnInstant = authnStatement.getAuthenticationInstant(); String subjectLocalityAddress = null;
DateTime authnInstant = authnStatement.getAuthenticationInstant(); String subjectLocalityAddress = null;