diff options
Diffstat (limited to 'src/main/java/com/juick/www/controllers/SocialLogin.java')
-rw-r--r-- | src/main/java/com/juick/www/controllers/SocialLogin.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/com/juick/www/controllers/SocialLogin.java b/src/main/java/com/juick/www/controllers/SocialLogin.java index c9611543..24bf97f6 100644 --- a/src/main/java/com/juick/www/controllers/SocialLogin.java +++ b/src/main/java/com/juick/www/controllers/SocialLogin.java @@ -27,7 +27,6 @@ import com.juick.model.ext.vk.UsersResponse; import com.juick.service.EmailService; import com.juick.service.TelegramService; import com.juick.service.UserService; -import com.juick.service.security.annotation.Visitor; import com.juick.util.HttpBadRequestException; import jakarta.annotation.PostConstruct; @@ -46,11 +45,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.*; import org.springframework.web.util.UriComponentsBuilder; import javax.inject.Inject; @@ -191,8 +186,8 @@ public class SocialLogin { } @GetMapping("/_twitter") - protected void doTwitterLogin(@Visitor com.juick.model.User user, HttpServletRequest request, - HttpServletResponse response) throws IOException, ExecutionException, InterruptedException { + protected void doTwitterLogin(@ModelAttribute com.juick.model.User user, HttpServletRequest request, + HttpServletResponse response) throws IOException, ExecutionException, InterruptedException { String hash = StringUtils.EMPTY, request_token = StringUtils.EMPTY, request_token_secret = StringUtils.EMPTY; String verifier = request.getParameter("oauth_verifier"); Cookie[] cookies = request.getCookies(); |