sso update

This commit is contained in:
Rinjae
2025-11-28 12:17:06 +09:00
parent 9f9c0763fa
commit 179b9bc786
2 changed files with 43 additions and 19 deletions
@@ -21,14 +21,12 @@ import java.util.Properties;
public class SsoController implements InterceptorSkipController {
public static final String PROP_GORUP_ID = "Monitoring";
private final KjbPropertyInjector kjbPropertyInjector;
private final KjbSsoModule ssoModule;
private final KjbProperty prop;
public SsoController(MonitoringPropertyService monitoringPropertyService) {
this.kjbPropertyInjector = new KjbPropertyInjector(monitoringPropertyService, PROP_GORUP_ID);
KjbPropertyInjector kjbPropertyInjector = new KjbPropertyInjector(monitoringPropertyService, PROP_GORUP_ID);
prop = kjbPropertyInjector.inject(new KjbProperty());
this.ssoModule = KjbSsoModule.getInstance(prop);
}
@@ -40,6 +38,18 @@ public class SsoController implements InterceptorSkipController {
log.debug("ssoId : {}", ssoId);
log.debug("uurl : {}", uurl);
// 디버깅용 쿠키 목록 출력
Cookie[] cookies = req.getCookies();
if (cookies == null || cookies.length == 0) {
log.debug("No cookies");
} else {
for (Cookie c: cookies) {
log.debug("Cookie[{}] : {}, Domain={}, Path={}, Max-Age={}, Secure={}, Version={}",
c.getName(), c.getValue(), c.getDomain(), c.getPath(), c.getMaxAge(), c.getSecure(), c.getVersion());
}
}
if (StringUtils.isEmpty(uurl)) {
@@ -50,23 +60,13 @@ public class SsoController implements InterceptorSkipController {
ssoModule.goLoginPage(res, uurl);
return null;
} else {
String retCode = ssoModule.getEamSessionCheck(req, res);
log.debug("retCode : {}", retCode);
log.debug("Property - sso.ignore_validation = {}", prop.isSsoIgnoreValidation());
if (!prop.isSsoIgnoreValidation() && !"0".equalsIgnoreCase(retCode)) {
// 디버깅용 쿠키 목록 출력
Cookie[] cookies = req.getCookies();
if (cookies == null || cookies.length == 0) {
log.debug("No cookies");
}
for (Cookie c: cookies) {
log.debug("Cookie[{}] : {}, Domain={}, Path={}, Max-Age={}, Secure={}, Version={}",
c.getName(), c.getValue(), c.getDomain(), c.getPath(), c.getMaxAge(), c.getSecure(), c.getVersion());
}
ssoModule.goErrorPage(res, Integer.parseInt(retCode));
return null;
}