// Get the subject
List<SAML11StatementAbstractType> statements = assertion.getStatements();
for (SAML11StatementAbstractType statement : statements) {
if (statement instanceof SAML11AuthenticationStatementType) {
SAML11AuthenticationStatementType subStat = (SAML11AuthenticationStatementType) statement;
SAML11SubjectType subject = subStat.getSubject();
username = subject.getChoice().getNameID().getValue();
}
}
roles = AssertionUtil.getRoles(assertion, null);
}