@Override
protected void renderMergedOutputModel(final Map model,
final HttpServletRequest request, final HttpServletResponse response) throws Exception {
try {
final Assertion assertion = getAssertionFrom(model);
final Authentication authentication = assertion.getChainedAuthentications().get(0);
final Date currentDate = new Date();
final String authenticationMethod = (String) authentication.getAttributes().get(SamlAuthenticationMetaDataPopulator.ATTRIBUTE_AUTHENTICATION_METHOD);
final Service service = assertion.getService();
final SAMLResponse samlResponse = new SAMLResponse(null, service.getId(), new ArrayList<Object>(), null);
samlResponse.setIssueInstant(currentDate);
// this should be true, but we never enforced it, so we need to check to be safe