spSSODescriptor.setWantAssertionsSigned(true); spSSODescriptor.setAuthnRequestsSigned(true);
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { SPSSODescriptor descriptor = (SPSSODescriptor) samlObject; if (attribute.getLocalName().equals(SPSSODescriptor.AUTH_REQUESTS_SIGNED_ATTRIB_NAME)) { descriptor.setAuthnRequestsSigned(XSBooleanValue.valueOf(attribute.getValue())); } else if (attribute.getLocalName().equals(SPSSODescriptor.WANT_ASSERTIONS_SIGNED_ATTRIB_NAME)) { descriptor.setWantAssertionsSigned(XSBooleanValue.valueOf(attribute.getValue())); } else { super.processAttribute(samlObject, attribute); } } }
SPSSODescriptor spDescriptor = builder.buildObject(); spDescriptor.setAuthnRequestsSigned(requestSigned); spDescriptor.setWantAssertionsSigned(wantAssertionSigned); spDescriptor.addSupportedProtocol(SAMLConstants.SAML20P_NS);