From 5f692eafbda6c7ce31bdd6af62c26f6c05249369 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 20 Dec 2019 17:49:24 +0300 Subject: Fix endpoint naming --- src/main/java/com/juick/server/configuration/SecurityConfig.java | 2 +- src/main/java/com/juick/server/www/controllers/SocialLogin.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/server/configuration/SecurityConfig.java b/src/main/java/com/juick/server/configuration/SecurityConfig.java index 375e5bfb..dacb8a1c 100644 --- a/src/main/java/com/juick/server/configuration/SecurityConfig.java +++ b/src/main/java/com/juick/server/configuration/SecurityConfig.java @@ -118,7 +118,7 @@ public class SecurityConfig { .antMatchers("/api/", "/api/messages", "/api/avatar", "/api/messages/discussions", "/api/users", "/api/thread", "/api/tags", "/api/tlgmbtwbhk", "/api/fbwbhk", "/api/skypebotendpoint", "/api/_fblogin", "/api/_vklogin", "/api/_tglogin", - "/api/_google", "/api/_apple", "/api/signup", "/api/inbox", "/api/events", "/api/info/**", + "/api/_google", "/api/_applelogin", "/api/signup", "/api/inbox", "/api/events", "/api/info/**", "/api/nodeinfo/2.0").permitAll() .anyRequest().hasRole("USER") .and() diff --git a/src/main/java/com/juick/server/www/controllers/SocialLogin.java b/src/main/java/com/juick/server/www/controllers/SocialLogin.java index eb1e3cfe..ff17fb70 100644 --- a/src/main/java/com/juick/server/www/controllers/SocialLogin.java +++ b/src/main/java/com/juick/server/www/controllers/SocialLogin.java @@ -343,7 +343,7 @@ public class SocialLogin { throw new HttpBadRequestException(); } - @GetMapping("/_apple") + @GetMapping("/_applelogin") public String doAppleLogin(HttpServletRequest request, @RequestParam(required = false) String code, HttpServletResponse response) { @@ -355,7 +355,7 @@ public class SocialLogin { } throw new HttpBadRequestException(); } - @PostMapping("/_apple") + @PostMapping("/_applelogin") public String doVerifyAppleResponse(HttpServletRequest request, HttpServletResponse response, @RequestParam Map body) throws InterruptedException, ExecutionException, IOException, ParseException, JOSEException, BadJOSEException { OAuth2AccessToken token = appleSignInService.getAccessToken(body.get("code")); var jsonNode = jsonMapper.readTree(token.getRawResponse()); -- cgit v1.2.3