Merge branch 'master' of http://docs.nculture.org:30000/nculture/iams.nlib
This commit is contained in:
commit
f62f0dc704
@ -296,15 +296,33 @@ public class LoginController {
|
|||||||
@PathVariable String callType,
|
@PathVariable String callType,
|
||||||
@PathVariable String oauthServiceName,
|
@PathVariable String oauthServiceName,
|
||||||
@RequestParam(required = false) String code,
|
@RequestParam(required = false) String code,
|
||||||
|
@RequestParam(required = false) String error,
|
||||||
Model model,
|
Model model,
|
||||||
HttpSession session) throws Exception {
|
HttpSession session) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
log.debug("loginOauthCallback > sessionid=" + session.getId());
|
|
||||||
|
|
||||||
String redirectUrl = NlibProperty.getString("home.uri"); // "/index.do";
|
|
||||||
String councilJsessionId = (String)session.getAttribute("councilJsessionId");
|
String councilJsessionId = (String)session.getAttribute("councilJsessionId");
|
||||||
String councilCd = (String)session.getAttribute("councilCd");
|
String councilCd = (String)session.getAttribute("councilCd");
|
||||||
|
String councilHomeUrl = (String)session.getAttribute("councilHomeUrl");
|
||||||
|
String redirectUrl = NlibProperty.getString("home.uri"); // "/index.do";
|
||||||
|
|
||||||
|
if(StringUtil.isNotEmpty(error)) {
|
||||||
|
|
||||||
|
// 구글 정보 제공 동의 거절한 경우
|
||||||
|
// https://nlib-dev.nculture.org/member/google/callback.do?error=access_denied
|
||||||
|
if(StringUtil.equalsIgnoreCase("access_denied", error)) {
|
||||||
|
if(OAuthLogin.CALL_TYPE_LOGIN.equalsIgnoreCase(callType)) {
|
||||||
|
// 로그인인 경우
|
||||||
|
redirectUrl = councilHomeUrl + NlibProperty.getString("nculture.login.post.login.redirect.uri");
|
||||||
|
} else {
|
||||||
|
// 회원가입인 경우
|
||||||
|
redirectUrl = councilHomeUrl + NlibProperty.getString("nculture.login.post.member.redirect.uri");
|
||||||
|
}
|
||||||
|
redirectUrl = StringUtil.addWebParamOfUrl(redirectUrl, "message", "서비스를 이용하시려면 정보제공 동의가 필요합니다.");
|
||||||
|
return "redirect:" + redirectUrl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log.debug("loginOauthCallback > sessionid=" + session.getId());
|
||||||
|
|
||||||
log.debug("oauthLoginCallback: code = ", code);
|
log.debug("oauthLoginCallback: code = ", code);
|
||||||
|
|
||||||
@ -337,7 +355,6 @@ public class LoginController {
|
|||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// 해당 처리기로 전환
|
// 해당 처리기로 전환
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
String councilHomeUrl = (String)session.getAttribute("councilHomeUrl");
|
|
||||||
if(OAuthLogin.CALL_TYPE_LOGIN.equalsIgnoreCase(callType)) {
|
if(OAuthLogin.CALL_TYPE_LOGIN.equalsIgnoreCase(callType)) {
|
||||||
// 로그인인 경우
|
// 로그인인 경우
|
||||||
SessionConfig.setLoginInfo(councilJsessionId, oauthUser);
|
SessionConfig.setLoginInfo(councilJsessionId, oauthUser);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user