58 评论

9527

这种情况下设计器怎么连接呢?设计器认证该怎么写呢?

0 2018-07-04 14:40

yaxuan

影响是什么

0 2018-06-28 14:09

plough

在 Filter 中加一行 authentication.setAuthenticated(true);

位置为:
User user1 = UserControl.getInstance().getByUserName(username);
if (user1 != null && session.getAttribute("fr_fs_auth_key") == null) { //如果用户名在fs的用户列表里则做登陆操作
FSAuthentication authentication = new DaoFSAuthentication(new UserInfo(user1.getId(), user1.getUsername(), user1.getPassword()));
long userid = authentication.getUserInfo().getId();
PrivilegeInfoSessionMananger.login(new FServicePrivilegeLoader(username, UserControl.getInstance().getAllSRoleNames(userid), UserControl.getInstance().getUserDP(userid)), session, resp);
authentication.setAuthenticated(true); // 加到这里
session.setAttribute("fr_fs_auth_key", authentication);
UserControl.getInstance().login(userid);
System.out.println("fr FrFilter is over with username is -" + username + "- and userpass is -" + userpass + "-");
FRContext.getLogger().error("fr FrFilter is over with username is ###" + username + "### and userpass is ###" + userpass + "###");
filterChain.doFilter(req, res);
} else if (user1 != null & session.getAttribute("fr_fs_auth_key") != null) {
filterChain.doFilter(req, res);
FRContext.getLogger().error("no need");
} else {
resp.sendRedirect("http://www.hao123.com"); //如果用户名不在fs的用户列表里则跳转hao123
}

0 2018-06-28 13:47

ya47o0u

hao123 广告费多少钱?我 fanruan 出 3倍

0 2018-06-05 11:59

291499062

启动和访问时,控制台也没有报错

3 2018-05-16 19:13