return null;
}
public void writeMetaData(Writer writer) {
try {
ObjectFactory metaDataFactory = new ObjectFactory();
IndexedEndpointType acsRedirectEndpoint = metaDataFactory.createIndexedEndpointType();
acsRedirectEndpoint.setBinding(SamlConstants.HTTP_REDIRECT_BINDING);
acsRedirectEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_ASSERTION_CONSUMER_SERVICE));
IndexedEndpointType acsPostEndpoint = metaDataFactory.createIndexedEndpointType();
acsPostEndpoint.setBinding(SamlConstants.HTTP_POST_BINDING);
acsPostEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_ASSERTION_CONSUMER_SERVICE));
SPSSODescriptorType spSsoDescriptor = metaDataFactory.createSPSSODescriptorType();
spSsoDescriptor.getAssertionConsumerService().add(acsRedirectEndpoint);
spSsoDescriptor.getAssertionConsumerService().add(acsPostEndpoint);
addSloEndpointsToMetaData(spSsoDescriptor);
spSsoDescriptor.setAuthnRequestsSigned(isAuthnRequestsSigned());
spSsoDescriptor.setWantAssertionsSigned(isWantAssertionsSigned());
spSsoDescriptor.getProtocolSupportEnumeration().add(SamlConstants.PROTOCOL_NSURI);
addNameIDFormatsToMetaData(spSsoDescriptor);
if (getSigningKey() != null) {
addKeyDescriptorToMetaData(spSsoDescriptor);
}
EntityDescriptorType entityDescriptor = metaDataFactory.createEntityDescriptorType();
entityDescriptor.setEntityID(getEntityId());
entityDescriptor.getRoleDescriptorOrIDPSSODescriptorOrSPSSODescriptor().add(spSsoDescriptor);
Marshaller marshaller = metaDataJaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.marshal(metaDataFactory.createEntityDescriptor(entityDescriptor), writer);
} catch (JAXBException e) {
throw new RuntimeException(e);
}
}