if (remoteUsers.size() > 0)
{
// TODO: in case of multiple users, invent a way to choose one of them
// right now, simply the first SSO user is selected
SSOUser remoteUser = remoteUsers.iterator().next();
SSOClient client = sso.getClient(site, remoteUser);
if (client == null)
{
response.getWriter().println("<P>Could not create client for site with name " + ssoSite + " and user "+request.getUserPrincipal().getName()+"</P>");
return;
}
client.write(destinationURL, forceRefresh, response.getWriter());
PortletURL actionURL = response.createActionURL();
ScriptPostProcess processor = new ScriptPostProcess();
processor.setInitalPage(page);
processor.postProcessPage(actionURL, ACTION_PARAMETER_SSOPROXY);