提交 a521210a authored 作者: husishuai's avatar husishuai

新增注释

上级 caf9b00b
......@@ -66,17 +66,17 @@ public class SSOSeraphAuthenticator extends DefaultAuthenticator {
// jira请求标识
httpServletRequest.setAttribute("com.atlassian.confluence.login.direct", true);
// 1 检查uap是否登录
// CheckLoginResult checkLoginResult = AuapUserService.checkLogin(clientIp);
// if (BeanUtil.isEmpty(checkLoginResult)) {
// 1 获取客户端ip地址
// String clientIp = IpUtil.getClientIp(httpServletRequest);
// if (StrUtil.isBlank(clientIp)) {
// // 重定向到auap登录页
// httpServletResponse.sendRedirect("http://www.baidu.com");
// return false;
// }
// 2 通过ip获取用户信息
// String clientIp = IpUtil.getClientIp(httpServletRequest);
// if (StrUtil.isBlank(clientIp)) {
// 2 检查当前ip是否在auap登录
// CheckLoginResult checkLoginResult = AuapUserService.checkLogin(clientIp);
// if (BeanUtil.isEmpty(checkLoginResult)) {
// // 重定向到auap登录页
// httpServletResponse.sendRedirect("http://www.baidu.com");
// return false;
......@@ -87,11 +87,19 @@ public class SSOSeraphAuthenticator extends DefaultAuthenticator {
// 如果是空,则表示未走登录页。那么从auap中获取用户名称
if (CharSequenceUtil.isBlank(username) && CharSequenceUtil.isBlank(password)) {
// 3.1 获取:用户、组信息
/**
* auap获取用户的代码
* 用户实体
* AuapUserInfo auapUserInfo = checkLoginResult.getContent();
*/
// 模拟用户信息
HashMap<String, Object> auapUserInfo = new HashMap<>();
auapUserInfo.put("username", "zhangsan");
auapUserInfo.put("staTruename", "张三");
auapUserInfo.put("deptId", "1813");
auapUserInfo.put("deptName", "分公司一-七组");
// auap账号名称
username = auapUserInfo.get("username").toString();
// 昵称
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论