return ((UniqueKeyUserDetails) authentication.getPrincipal()).getUniqueKey();
}
private void sendDiscoveryXml(HttpServletRequest request, HttpServletResponse response)
throws IOException {
XrdsDocumentBuilder documentBuilder = new XrdsDocumentBuilder();
if (request.getParameterMap().containsKey("id")) {
documentBuilder.addSignOnSerice(request.getRequestURL().toString());
} else {
documentBuilder.addServerService(request.getRequestURL().toString());
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Sending xrds document:\n" + documentBuilder.getDocumentAsString());
}
writeToResponse(response, documentBuilder.getDocumentAsString(), MIME_TYPE_XRDS_XML);
}