for (Iterator iterator = assertions.iterator(); iterator.hasNext();) {
XmlPrimtiveAssertion primtive = (XmlPrimtiveAssertion) iterator.next();
QName qname = primtive.getName();
if (SP12Constants.HTTPS_TOKEN.equals(qname)) {
HttpsToken httpsToken = new HttpsToken(SPConstants.SP_V12);
OMElement element = primtive.getValue().getFirstChildWithName(SPConstants.POLICY);
if (element != null) {
OMElement child = element.getFirstElement();
if (child != null) {
if (SP12Constants.HTTP_BASIC_AUTHENTICATION.equals(child.getQName())) {
httpsToken.setHttpBasicAuthentication(true);
} else if (SP12Constants.HTTP_DIGEST_AUTHENTICATION.equals(child.getQName())) {
httpsToken.setHttpDigestAuthentication(true);
} else if (SP12Constants.REQUIRE_CLIENT_CERTIFICATE.equals(child.getQName())) {
httpsToken.setRequireClientCertificate(true);
}
}
}
parent.setToken(httpsToken);