return null;
}
public void writeMetaData(Writer writer) {
try {
ObjectFactory metaDataFactory = new ObjectFactory();
IndexedEndpointType ssoRedirectEndpoint = metaDataFactory.createIndexedEndpointType();
ssoRedirectEndpoint.setBinding(SamlConstants.HTTP_REDIRECT_BINDING);
ssoRedirectEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_SINGLE_SIGN_ON_SERVICE));
IndexedEndpointType ssoPostEndpoint = metaDataFactory.createIndexedEndpointType();
ssoPostEndpoint.setBinding(SamlConstants.HTTP_POST_BINDING);
ssoPostEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_SINGLE_SIGN_ON_SERVICE));
IDPSSODescriptorType idpSsoDescriptor = metaDataFactory.createIDPSSODescriptorType();
idpSsoDescriptor.getSingleSignOnService().add(ssoRedirectEndpoint);
idpSsoDescriptor.getSingleSignOnService().add(ssoPostEndpoint);
addSloEndpointsToMetaData(idpSsoDescriptor);
idpSsoDescriptor.setWantAuthnRequestsSigned(isWantAuthnRequestsSigned());
idpSsoDescriptor.getProtocolSupportEnumeration().add(SamlConstants.PROTOCOL_NSURI);
addNameIDFormatsToMetaData(idpSsoDescriptor);
addKeyDescriptorToMetaData(idpSsoDescriptor);
EntityDescriptorType entityDescriptor = metaDataFactory.createEntityDescriptorType();
entityDescriptor.setEntityID(getEntityId());
entityDescriptor.getRoleDescriptorOrIDPSSODescriptorOrSPSSODescriptor().add(idpSsoDescriptor);
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);
}
}