|
|
@@ -2,6 +2,7 @@ package com.java110.user.cmd.user;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.core.annotation.Java110Cmd;
|
|
|
+import com.java110.core.context.CmdContextUtils;
|
|
|
import com.java110.core.context.ICmdDataFlowContext;
|
|
|
import com.java110.core.event.cmd.Cmd;
|
|
|
import com.java110.core.event.cmd.CmdEvent;
|
|
|
@@ -20,9 +21,10 @@ public class UserLogoutServiceCmd extends Cmd {
|
|
|
@Override
|
|
|
public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
|
|
|
ResponseEntity responseEntity= null;
|
|
|
+ String token = CmdContextUtils.getTokenId(context);
|
|
|
try {
|
|
|
//删除 token 信息
|
|
|
- AuthenticationFactory.deleteToken(reqJson.getString("token"));
|
|
|
+ AuthenticationFactory.deleteToken(token);
|
|
|
responseEntity = new ResponseEntity<String>("退出登录成功", HttpStatus.OK);
|
|
|
} catch (Exception e) {
|
|
|
//Invalid signature/claims
|