增加查看当前登录用户的权限

This commit is contained in:
zhouhao
2017-04-09 00:10:48 +08:00
parent dede390372
commit 4071b1201a

View File

@@ -55,7 +55,6 @@ public class AuthorizationController {
private AuthorizationListenerDispatcher authorizationListenerDispatcher;
@GetMapping("/login-out")
@AccessLogger("退出登录")
@Authorize
@ApiOperation("退出当前登录")
public ResponseMessage exit(@ApiParam(hidden = true) Authentication authentication) {
@@ -63,8 +62,14 @@ public class AuthorizationController {
return ok();
}
@GetMapping("/me")
@Authorize
@ApiOperation("当前登录用户权限信息")
public ResponseMessage<Authentication> me(@ApiParam(hidden = true) Authentication authentication) {
return ok(authentication);
}
@PostMapping(value = "/login")
@AccessLogger("授权")
@ApiOperation("用户名密码登录")
public ResponseMessage<String> authorize(@RequestParam @ApiParam("用户名") String username,
@RequestParam @ApiParam("密码") String password,