|
@@ -172,4 +172,15 @@ public class UserContextController {
|
|
|
return Response.ok(ContextUtils.getUserContext());
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "刷新上下文", notes = "刷新上下文")
|
|
|
+ @RequestMapping(value = "/userContext/refresh", method = RequestMethod.GET)
|
|
|
+ public Response refresh() {
|
|
|
+ Subject subject = SecurityUtils.getSubject();
|
|
|
+ if (!subject.isAuthenticated()) {
|
|
|
+ return Response.fail(Constant.CODE_AUTH_FAILED, Constant.RET_AUTH_FAILED);
|
|
|
+ }
|
|
|
+ mgrUserService.loadContext(subject);
|
|
|
+ return Response.ok();
|
|
|
+ }
|
|
|
+
|
|
|
}
|