diff options
author | Vitaly Takmazov | 2023-01-05 11:00:50 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-05 20:58:47 +0300 |
commit | cdd03aa64548810591e043fb59a287a1b36c92ba (patch) | |
tree | 665ad1e3f1162d0be76c95a814ec4500bcf5ce55 /src/main/java/com/juick/www/api | |
parent | 120b26c55069f89cc60ef862514d5cf09566f348 (diff) |
ActivityPub: signed GET requests, fix Signature verification
Diffstat (limited to 'src/main/java/com/juick/www/api')
-rw-r--r-- | src/main/java/com/juick/www/api/Users.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/com/juick/www/api/Users.java b/src/main/java/com/juick/www/api/Users.java index f7c24d8d..124632d0 100644 --- a/src/main/java/com/juick/www/api/Users.java +++ b/src/main/java/com/juick/www/api/Users.java @@ -72,11 +72,6 @@ public class Users { @Inject private ApplicationEventPublisher applicationEventPublisher; - @RequestMapping(value = "/api/auth", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public String getAuthToken(@ModelAttribute User visitor) { - return userService.getHashByUID(visitor.getUid()); - } - @RequestMapping(value = "/api/users", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public List<User> doGetUsers( @ModelAttribute User visitor, @@ -105,7 +100,7 @@ public class Users { SecureUser me = new SecureUser(); me.setUid(visitor.getUid()); me.setName(visitor.getName()); - me.setAuthHash(getAuthToken(visitor)); + me.setAuthHash(userService.getHashByUID(visitor.getUid())); List<Integer> unread = messagesService.getUnread(visitor); me.setUnread(unread); me.setUnreadCount(unread.size()); |