aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-12-20 17:29:33 +0300
committerGravatar Vitaly Takmazov2019-12-20 17:29:33 +0300
commite77f2f9cc3ba5d0ef564ba7ffcd23e829704840c (patch)
treeb6fa91c777a4c1b2be48adb63f4287e021c68cc1 /src/main/java/com/juick/server/api
parent072e6dad9787c9521411e67c1649351400f196a1 (diff)
Fix mappings
Diffstat (limited to 'src/main/java/com/juick/server/api')
-rw-r--r--src/main/java/com/juick/server/api/ApiSocialLogin.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/juick/server/api/ApiSocialLogin.java b/src/main/java/com/juick/server/api/ApiSocialLogin.java
index 0dbdd09f..a2b80932 100644
--- a/src/main/java/com/juick/server/api/ApiSocialLogin.java
+++ b/src/main/java/com/juick/server/api/ApiSocialLogin.java
@@ -285,8 +285,8 @@ public class ApiSocialLogin {
return ResponseEntity.status(HttpStatus.FORBIDDEN).body(null);
}
}
- @GetMapping("/_apple")
- public String doAppleApiLogin(@RequestParam(required = false) String code, @RequestParam String state) {
+ @GetMapping("/api/_apple")
+ public String doAppleLogin(@RequestParam(required = false) String code, @RequestParam String state) {
if (StringUtils.isBlank(code)) {
String astate = UUID.randomUUID().toString();
crosspostService.addVKState(astate, state);
@@ -294,8 +294,8 @@ public class ApiSocialLogin {
}
throw new HttpBadRequestException();
}
- @PostMapping("/_apple")
- public String doVerifyAppleResponseAPI(@RequestParam Map<String, String> body) throws InterruptedException, ExecutionException, IOException, ParseException, JOSEException, BadJOSEException {
+ @PostMapping("/api/_apple")
+ public String doVerifyAppleResponse(@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());
var idToken = jsonNode.get("id_token").textValue();