aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-02-27 14:00:13 +0300
committerGravatar Vitaly Takmazov2020-02-27 14:01:01 +0300
commit6d177fbb3e57409b223e835eabc79009a89a1031 (patch)
tree5144cf89e6095c8ec693a771dd284fc3cce11d6e /src/main/java/com/juick/service
parent8f3a101df251de5965ca28086974c2c10f60c6d9 (diff)
API: handle existing Google user flow
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r--src/main/java/com/juick/service/UserService.java4
-rw-r--r--src/main/java/com/juick/service/UserServiceImpl.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/juick/service/UserService.java b/src/main/java/com/juick/service/UserService.java
index cc834173..71b38594 100644
--- a/src/main/java/com/juick/service/UserService.java
+++ b/src/main/java/com/juick/service/UserService.java
@@ -19,7 +19,7 @@ package com.juick.service;
import com.juick.Message;
import com.juick.User;
-import com.juick.model.Auth;
+import com.juick.model.AuthResponse;
import javax.annotation.Nonnull;
import java.util.Collection;
@@ -113,7 +113,7 @@ public interface UserService {
List<String> getAllJIDs(User user);
- List<Auth> getAuthCodes(User user);
+ List<AuthResponse> getAuthCodes(User user);
List<String> getEmails(User user);
diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java
index dc35f361..9f01b4db 100644
--- a/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/src/main/java/com/juick/service/UserServiceImpl.java
@@ -20,7 +20,7 @@ package com.juick.service;
import com.juick.Message;
import com.juick.User;
import com.juick.model.AnonymousUser;
-import com.juick.model.Auth;
+import com.juick.model.AuthResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
@@ -630,10 +630,10 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Transactional(readOnly = true)
@Override
- public List<Auth> getAuthCodes(final User user) {
+ public List<AuthResponse> getAuthCodes(final User user) {
return getJdbcTemplate().query(
"SELECT account,authcode FROM auth WHERE user_id=? AND protocol='xmpp'",
- (rs, num) -> new Auth(rs.getString(1), rs.getString(2)),
+ (rs, num) -> new AuthResponse(null, rs.getString(1), rs.getString(2)),
user.getUid());
}