builderFactory.getBuilder(SubjectLocality.DEFAULT_ELEMENT_NAME);
}
if (authBeans != null && authBeans.size() > 0) {
for (AuthenticationStatementBean statementBean : authBeans) {
AuthenticationStatement authenticationStatement =
authenticationStatementV1Builder.buildObject(
AuthenticationStatement.DEFAULT_ELEMENT_NAME,
AuthenticationStatement.TYPE_NAME
);
Subject authSubject =
SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject());
authenticationStatement.setSubject(authSubject);
if (statementBean.getAuthenticationInstant() != null) {
authenticationStatement.setAuthenticationInstant(
statementBean.getAuthenticationInstant()
);
} else {
authenticationStatement.setAuthenticationInstant(new DateTime());
}
authenticationStatement.setAuthenticationMethod(
transformAuthenticationMethod(statementBean.getAuthenticationMethod())
);
SubjectLocalityBean subjectLocalityBean = statementBean.getSubjectLocality();
if (subjectLocalityBean != null) {
SubjectLocality subjectLocality = subjectLocalityBuilder.buildObject();
subjectLocality.setDNSAddress(subjectLocalityBean.getDnsAddress());
subjectLocality.setIPAddress(subjectLocalityBean.getIpAddress());
authenticationStatement.setSubjectLocality(subjectLocality);
}
authenticationStatements.add(authenticationStatement);
}
}