fillStatusResponseFields(response, SamlConstants.STATUS_SUCCESS, null);
AssertionType assertion = assertionObjectFactory.createAssertionType();
response.getAssertionOrEncryptedAssertion().add(assertion);
SubjectType subject = assertionObjectFactory.createSubjectType();
assertion.setSubject(subject);
NameIDType nameID = assertionObjectFactory.createNameIDType();
subject.getContent().add(assertionObjectFactory.createNameID(nameID));
nameID.setValue(session.getPrincipal().getNameId().getValue());
nameID.setFormat(session.getPrincipal().getNameId().getFormat());
nameID.setNameQualifier(session.getPrincipal().getNameId().getQualifier());
SubjectConfirmationType subjectConfirmation = assertionObjectFactory.createSubjectConfirmationType();
subject.getContent().add(assertionObjectFactory.createSubjectConfirmation(subjectConfirmation));
subjectConfirmation.setMethod(SamlConstants.CONFIRMATION_METHOD_BEARER);
subjectConfirmation.setNameID(nameID);
SubjectConfirmationDataType subjectConfirmationData = assertionObjectFactory.createSubjectConfirmationDataType();
subjectConfirmation.setSubjectConfirmationData(subjectConfirmationData);