if (site.getRemoteUsers() != null)
{
Iterator<JSSSOSiteRemoteUser> ruIter = site.getRemoteUsers().iterator();
while (ruIter.hasNext())
{
JSSSOSiteRemoteUser rUser = ruIter.next();
if (rUser.getPassword() != null)
{
String pName = rUser.getPrincipalName();
String pType = rUser.getPrincipalType();
JetspeedPrincipal principal = null;
if (pType.equals("user"))
{
principal = userManager.getUser(pName);
}
else if (pType.equals("group"))
{
principal = groupManager.getGroup(pName);
}
if (principal != null)
{
String rName = rUser.getName();
String rPassword = new String(rUser.getPassword());
ssoManager.addUser(s, principal, rName, SSOUtils.unscramble(rPassword));
}
else
{
throw new IllegalArgumentException("Cannot lookup or create SSO remote user for principal "+pType+":"+pName);