Commit fd34ed878fba3302c6e1386f7e2eafa848b18ac6
1 parent
1b67bf29ad
Exists in
master
and in
1 other branch
增加退出登录接口
Showing 1 changed file with 12 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
fd34ed8
| ... | ... | @@ -908,5 +908,17 @@ |
| 908 | 908 | usersService.updateUsers(users); |
| 909 | 909 | ResultUtils.buildSuccessResultAndWrite(response); |
| 910 | 910 | } |
| 911 | + | |
| 912 | + @RequestMapping(value = "/logout", method = RequestMethod.GET) | |
| 913 | + @ResponseBody | |
| 914 | + public Map<String, Object> resetToken(@RequestHeader(value = "Authorization", required = false) String token) { | |
| 915 | + if (StringUtils.isNotEmpty(token)) { | |
| 916 | + LoginUtil.deleteToken(token); | |
| 917 | + } | |
| 918 | + Map<String, Object> result = new HashMap<>(); | |
| 919 | + result.put("errorcode", ConstantInterface.SUCCESS); | |
| 920 | + result.put("errormsg", "update"); | |
| 921 | + return result; | |
| 922 | + } | |
| 911 | 923 | } |