aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-12-20 17:49:24 +0300
committerGravatar Vitaly Takmazov2019-12-20 17:49:24 +0300
commit5f692eafbda6c7ce31bdd6af62c26f6c05249369 (patch)
tree860551900ab8b22f1f274d0250285d53e2d2879d /src/main/java
parent4eba3366faa487de6cfc842aeff4a9b3b446f968 (diff)
Fix endpoint naming
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/server/configuration/SecurityConfig.java2
-rw-r--r--src/main/java/com/juick/server/www/controllers/SocialLogin.java4
2 files changed, 3 insertions, 3 deletions
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<String, String> body) throws InterruptedException, ExecutionException, IOException, ParseException, JOSEException, BadJOSEException {
OAuth2AccessToken token = appleSignInService.getAccessToken(body.get("code"));
var jsonNode = jsonMapper.readTree(token.getRawResponse());