Index: .idea/sonarIssues.xml
===================================================================
diff -u -r9c682bfffc7a711c4653d1816a3e218913fd149f -rf65a84df30dda9e661e4b0af84b8f65311d94551
--- .idea/sonarIssues.xml (.../sonarIssues.xml) (revision 9c682bfffc7a711c4653d1816a3e218913fd149f)
+++ .idea/sonarIssues.xml (.../sonarIssues.xml) (revision f65a84df30dda9e661e4b0af84b8f65311d94551)
@@ -1828,6 +1828,16 @@
+
+
+
+
+
+
+
+
+
+
Index: standard/project/web/src/main/java/egovframework/com/ext/jstree/support/security/service/LocalUserDetailService.java
===================================================================
diff -u -r64d16c3d9ac985cb7a19b8e9f38236ae765711eb -rf65a84df30dda9e661e4b0af84b8f65311d94551
--- standard/project/web/src/main/java/egovframework/com/ext/jstree/support/security/service/LocalUserDetailService.java (.../LocalUserDetailService.java) (revision 64d16c3d9ac985cb7a19b8e9f38236ae765711eb)
+++ standard/project/web/src/main/java/egovframework/com/ext/jstree/support/security/service/LocalUserDetailService.java (.../LocalUserDetailService.java) (revision f65a84df30dda9e661e4b0af84b8f65311d94551)
@@ -1,25 +1,20 @@
package egovframework.com.ext.jstree.support.security.service;
-import java.util.ArrayList;
-import java.util.List;
-
+import egovframework.com.ext.jstree.support.security.database.dao.UserDAO;
+import egovframework.com.ext.jstree.support.security.database.model.Role;
+import egovframework.com.ext.jstree.support.security.database.model.User;
+import egovframework.com.ext.jstree.support.security.dto.LocalUser;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.encoding.ShaPasswordEncoder;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-import egovframework.com.ext.jstree.support.security.database.dao.UserDAO;
-import egovframework.com.ext.jstree.support.security.database.model.Role;
-import egovframework.com.ext.jstree.support.security.database.model.User;
-import egovframework.com.ext.jstree.support.security.dto.LocalUser;
+import java.util.ArrayList;
+import java.util.List;
-
-/**
- * @author Sunil Kumar
- * @since 26/12/15
- */
@Service("localUserDetailService")
public class LocalUserDetailService implements UserDetailsService {
Index: standard/project/web/src/main/java/egovframework/com/ext/jstree/support/security/service/RegistrationUserDetailService.java
===================================================================
diff -u -r64d16c3d9ac985cb7a19b8e9f38236ae765711eb -rf65a84df30dda9e661e4b0af84b8f65311d94551
--- standard/project/web/src/main/java/egovframework/com/ext/jstree/support/security/service/RegistrationUserDetailService.java (.../RegistrationUserDetailService.java) (revision 64d16c3d9ac985cb7a19b8e9f38236ae765711eb)
+++ standard/project/web/src/main/java/egovframework/com/ext/jstree/support/security/service/RegistrationUserDetailService.java (.../RegistrationUserDetailService.java) (revision f65a84df30dda9e661e4b0af84b8f65311d94551)
@@ -1,21 +1,20 @@
package egovframework.com.ext.jstree.support.security.service;
-import java.util.HashSet;
-
-import egovframework.com.ext.jstree.support.security.service.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
import egovframework.com.ext.jstree.support.security.database.dao.UserDAO;
import egovframework.com.ext.jstree.support.security.database.model.Role;
import egovframework.com.ext.jstree.support.security.database.model.User;
import egovframework.com.ext.jstree.support.security.dto.LocalUser;
import egovframework.com.ext.jstree.support.security.dto.UserRegistrationForm;
import egovframework.com.ext.jstree.support.security.exception.UserAlreadyExistAuthenticationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import java.util.HashSet;
+
/**
* @author Sunil Kumar
* @since 28/3/16
@@ -30,7 +29,10 @@
@Autowired
private UserDAO userDAO;
+ @Autowired
+ private BCryptPasswordEncoder passwordEncoder;
+
@Override
@Transactional(value = "transactionManager")
public LocalUser registerNewUser(final UserRegistrationForm userRegistrationForm) throws UserAlreadyExistAuthenticationException {
@@ -52,7 +54,7 @@
user.setUserId(formDTO.getUserId());
user.setEmailId(formDTO.getEmail());
user.setName(formDTO.getFirstName());
- user.setPassword(formDTO.getPassword());
+ user.setPassword(passwordEncoder.encode(formDTO.getPassword()));
final HashSet roles = new HashSet();
Role role = new Role();
role.setName("ROLE_USER");
Index: standard/project/web/src/main/resources/egovframework/spring/com/context-security.xml
===================================================================
diff -u -r3bda0a83ee4a2f1a10e14435080f6b2ebb30ad72 -rf65a84df30dda9e661e4b0af84b8f65311d94551
--- standard/project/web/src/main/resources/egovframework/spring/com/context-security.xml (.../context-security.xml) (revision 3bda0a83ee4a2f1a10e14435080f6b2ebb30ad72)
+++ standard/project/web/src/main/resources/egovframework/spring/com/context-security.xml (.../context-security.xml) (revision f65a84df30dda9e661e4b0af84b8f65311d94551)
@@ -6,18 +6,23 @@
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd">
-
-
+
+
+
+
+
+
+
@@ -56,7 +61,7 @@
-
+
@@ -79,7 +84,6 @@
-