private void createAndSetStatement(SAMLCallback callback) { AuthenticationStatementBean authBean = new AuthenticationStatementBean(); authBean.setAuthenticationMethod("Password"); callback.setAuthenticationStatementData(Collections.singletonList(authBean)); if (attributeStatements != null && !attributeStatements.isEmpty()) { List<AttributeStatementBean> attrStatementBeans = new ArrayList<>(); for (AttributeStatement attrStatement : attributeStatements) { AttributeStatementBean attrStatementBean = new AttributeStatementBean(); List<AttributeBean> attrBeans = new ArrayList<>(); for (Attribute attribute : attrStatement.getAttributes()) { AttributeBean attributeBean = new AttributeBean(); attributeBean.setQualifiedName(attribute.getName()); attributeBean.setNameFormat(attribute.getNameFormat()); List<Object> attributeValues = new ArrayList<>(); for (XMLObject attrVal : attribute.getAttributeValues()) { attributeValues.add(attrVal.getDOM().getTextContent()); } attributeBean.setAttributeValues(attributeValues); attrBeans.add(attributeBean); } attrStatementBean.setSamlAttributes(attrBeans); attrStatementBeans.add(attrStatementBean); } callback.setAttributeStatementData(attrStatementBeans); } }
callback.setAuthDecisionStatementData(Collections.singletonList(authDecBean)); AuthenticationStatementBean authBean = new AuthenticationStatementBean(); authBean.setSubject(subjectBean); authBean.setAuthenticationInstant(new DateTime());
callback.setAuthDecisionStatementData(Collections.singletonList(authDecBean)); AuthenticationStatementBean authBean = new AuthenticationStatementBean(); authBean.setSubject(subjectBean); authBean.setAuthenticationInstant(new DateTime());