try {
Document doc = new SAXBuilder().build(new URL(remoteURL));
Element el = doc.detachRootElement();
List list;
list = el.getChildren("isLogin");
Element element;
element = (Element) list.get(0);
if (element.getValue().equals("true")) {
list = el.getChildren("name");
element = (Element) list.get(0);
return element.getValue();
}
} catch (JDOMException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
//如果你的论坛必须要用户登后才行的话加上这行
JForumExecutionContext.setRedirect(SystemGlobals.getValue(ConfigKeys.SSO_REDIRECT));
return null;-------------------------------------为什么要返回null呢?
// user has changed user
} else if (remoteUser != null && !remoteUser.equals(userSession.getUsername())) {
return false;
}
return true; // myapp user and forum user the same
}