From aeda9e3733e685f5069b5cfbb16272cd32073fa0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 14 Oct 2017 21:15:52 +0300 Subject: spring-security: fill user authHash --- .../main/java/com/juick/service/security/JuickUserDetailsService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'juick-server-web/src/main') diff --git a/juick-server-web/src/main/java/com/juick/service/security/JuickUserDetailsService.java b/juick-server-web/src/main/java/com/juick/service/security/JuickUserDetailsService.java index c523f363..f6ae8909 100644 --- a/juick-server-web/src/main/java/com/juick/service/security/JuickUserDetailsService.java +++ b/juick-server-web/src/main/java/com/juick/service/security/JuickUserDetailsService.java @@ -43,8 +43,10 @@ public class JuickUserDetailsService implements UserDetailsService { com.juick.User user = userService.getFullyUserByName(username); - if (user != null) + if (user != null) { + user.setAuthHash(userService.getHashByUID(user.getUid())); return new JuickUser(user); + } throw new UsernameNotFoundException("The username " + username + " is not found"); } -- cgit v1.2.3