Index: .idea/sonarIssues.xml =================================================================== diff -u -r168267305d4b28d6f00223705d3d7a19bc42436a -r18b1aee629a50834746bc82e4511ab0c91d2b0a2 --- .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 168267305d4b28d6f00223705d3d7a19bc42436a) +++ .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 18b1aee629a50834746bc82e4511ab0c91d2b0a2) @@ -78,6 +78,11 @@ + + + + + FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/controller/PagesController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/controller/RegistrationController.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/database/dao/GenericDao.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/database/dao/RoleDAO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/database/dao/UserDAO.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/database/model/Role.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/database/model/User.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/dto/LocalUser.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/dto/SocialProvider.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/dto/SocialUser.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/dto/UserRegistrationForm.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/entrypoint/AppAuthenticationEntryPoint.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/exception/UserAlreadyExistAuthenticationException.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/handler/AppSuccessHandler.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/registry/AppConnectionSignUp.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/registry/AppSocialAuthenticationServiceRegistry.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/service/LocalUserDetailService.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/service/RegistrationUserDetailService.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/service/SocialUserDetailService.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/service/UserService.java'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/java/com/spring/security/social/login/example/util/SecurityUtil.java'. FishEye: No comparison available. Pass `N' to diff? Index: development-project/project-standard/standard-api-server/src/main/java/egovframework/com/ext/jstree/support/security/registry/AppConnectionSignUp.java =================================================================== diff -u -r168267305d4b28d6f00223705d3d7a19bc42436a -r18b1aee629a50834746bc82e4511ab0c91d2b0a2 --- development-project/project-standard/standard-api-server/src/main/java/egovframework/com/ext/jstree/support/security/registry/AppConnectionSignUp.java (.../AppConnectionSignUp.java) (revision 168267305d4b28d6f00223705d3d7a19bc42436a) +++ development-project/project-standard/standard-api-server/src/main/java/egovframework/com/ext/jstree/support/security/registry/AppConnectionSignUp.java (.../AppConnectionSignUp.java) (revision 18b1aee629a50834746bc82e4511ab0c91d2b0a2) @@ -1,6 +1,9 @@ package egovframework.com.ext.jstree.support.security.registry; +import egovframework.com.ext.jstree.support.security.database.dao.UserDAO; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.social.connect.Connection; import org.springframework.social.connect.ConnectionSignUp; import org.springframework.social.connect.UserProfile; @@ -10,6 +13,7 @@ import egovframework.com.ext.jstree.support.security.dto.SocialProvider; import egovframework.com.ext.jstree.support.security.dto.UserRegistrationForm; import egovframework.com.ext.jstree.support.security.service.UserService; +import org.springframework.util.ObjectUtils; /** * If no local user associated with the given connection then @@ -23,11 +27,25 @@ @Autowired private UserService userService; + @Autowired + @Qualifier(value = "localUserDetailService") + private UserDetailsService userDetailService; + + @Autowired + private UserDAO userDAO; + @Override public String execute(final Connection connection) { UserRegistrationForm userDetails = toUserRegistrationObject(connection.getKey().getProviderUserId(), SecurityUtil.toSocialProvider(connection.getKey().getProviderId()), connection.fetchUserProfile()); - LocalUser user = (LocalUser) userService.registerNewUser(userDetails); - return user.getUserId(); + + LocalUser checkToUser = (LocalUser) userDetailService.loadUserByUsername(userDetails.getUserId()); + if(null == checkToUser){ + LocalUser user = (LocalUser) userService.registerNewUser(userDetails); + return user.getUserId(); + }else{ + return checkToUser.getUserId(); + } + } private UserRegistrationForm toUserRegistrationObject(final String userId, final SocialProvider socialProvider, final UserProfile userProfile) { FishEye: Tag 18b1aee629a50834746bc82e4511ab0c91d2b0a2 refers to a dead (removed) revision in file `development-project/project-standard/standard-api-server/src/main/webapp/WEB-INF/spring-social-login-servlet.xml'. FishEye: No comparison available. Pass `N' to diff? Index: development-project/project-standard/standard-api-server/src/main/webapp/WEB-INF/web.xml =================================================================== diff -u -r168267305d4b28d6f00223705d3d7a19bc42436a -r18b1aee629a50834746bc82e4511ab0c91d2b0a2 --- development-project/project-standard/standard-api-server/src/main/webapp/WEB-INF/web.xml (.../web.xml) (revision 168267305d4b28d6f00223705d3d7a19bc42436a) +++ development-project/project-standard/standard-api-server/src/main/webapp/WEB-INF/web.xml (.../web.xml) (revision 18b1aee629a50834746bc82e4511ab0c91d2b0a2) @@ -22,15 +22,6 @@ /* - - hiddenHttpMethodFilter - org.springframework.web.filter.HiddenHttpMethodFilter - - - hiddenHttpMethodFilter - /* - - spring org.springframework.web.servlet.DispatcherServlet