private String rememberMeAttributeName = CasProtocolConstants.VALIDATION_REMEMBER_ME_ATTRIBUTE_NAME;
@Override
protected void prepareResponse(final Response response, final Map<String, Object> model) {
final org.jasig.cas.validation.Assertion casAssertion = getAssertionFrom(model);
final Authentication authentication = casAssertion.getChainedAuthentications().get(0);
final DateTime issuedAt = response.getIssueInstant();
final Service service = getAssertionFrom(model).getService();
// Build up the SAML assertion containing AuthenticationStatement and AttributeStatement
final Assertion assertion = newSamlObject(Assertion.class);
assertion.setID(generateId());
assertion.setIssueInstant(issuedAt);
assertion.setIssuer(this.issuer);
assertion.setConditions(newConditions(issuedAt, service.getId()));
final AuthenticationStatement authnStatement = newAuthenticationStatement(authentication);
assertion.getAuthenticationStatements().add(authnStatement);
final Subject subject = newSubject(authentication.getPrincipal().getId());
final Map<String, Object> attributesToSend = prepareSamlAttributes(authentication, casAssertion);
if (!attributesToSend.isEmpty()) {
assertion.getAttributeStatements().add(newAttributeStatement(subject, attributesToSend));
}