diff options
author | Vitaly Takmazov | 2021-10-18 00:40:10 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-10-18 02:10:01 +0300 |
commit | a2348e95bbacbc9a9961afcabb7bbe82f3c7fe9d (patch) | |
tree | 7c794eba8ce72e6533a818fcbfb3c8f87e36d2f8 /src/main/java/com/juick/service/UserService.java | |
parent | 6c82f3dea2c56e8d62bd2f154e2e701f96454418 (diff) |
Display error for social login
* CrossPostService gone
Diffstat (limited to 'src/main/java/com/juick/service/UserService.java')
-rw-r--r-- | src/main/java/com/juick/service/UserService.java | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/UserService.java b/src/main/java/com/juick/service/UserService.java index e1f53abb6..dc879821b 100644 --- a/src/main/java/com/juick/service/UserService.java +++ b/src/main/java/com/juick/service/UserService.java @@ -19,9 +19,13 @@ package com.juick.service; import com.juick.model.Message; import com.juick.model.User; +import com.juick.model.ApplicationStatus; import com.juick.model.AuthResponse; +import com.juick.model.ExternalToken; import com.juick.util.UsernameTakenException; +import org.apache.commons.lang3.tuple.Pair; + import javax.annotation.Nonnull; import java.util.Collection; import java.util.List; @@ -128,4 +132,59 @@ public interface UserService { boolean isAdminUser(User user); boolean isServiceUser(User user); + + Optional<ExternalToken> getTwitterToken(int uid); + + boolean deleteTwitterToken(Integer uid); + + void addFacebookState(String state, String redirectUri); + + void addVKState(String state, String redirectUri); + + String verifyFacebookState(String state); + + String verifyVKState(String state); + + Optional<Pair<String, String>> getFacebookTokens(int uid); + + ApplicationStatus getFbCrossPostStatus(int uid); + + boolean enableFBCrosspost(Integer uid); + + void disableFBCrosspost(Integer uid); + + @Nonnull + String getTwitterName(int uid); + + String getTelegramName(int uid); + + Optional<Pair<String, String>> getVkTokens(int uid); + + void deleteVKUser(Integer uid); + + Optional<User> getUserByFacebookId(long facebookId); + + boolean createFacebookUser(long fbID, String loginhash, String token, String fbName); + + boolean updateFacebookUser(long fbID, String token, String fbName); + + int getUIDbyVKID(long vkID); + + boolean createVKUser(long vkID, String loginhash, String token, String vkName, String vkLink); + + String getFacebookNameByHash(String hash); + + String getTelegramNameByHash(String hash); + + boolean setFacebookUser(String hash, int uid); + + String getVKNameByHash(String hash); + + boolean setVKUser(String hash, int uid); + + boolean setTelegramUser(String hash, int uid); + + String getJIDByHash(String hash); + + boolean setJIDUser(String hash, int uid); } |