上下文添加用户角色.

pull/28/head
chen.ma 3 years ago
parent 4e2f79d3ee
commit 4e2a03fad0

@ -72,7 +72,8 @@ public class JWTAuthorizationFilter extends BasicAuthenticationFilter {
}
String username = JwtTokenUtil.getUsername(token);
UserContext.setUserName(username);
String userRole = JwtTokenUtil.getUserRole(token);
UserContext.setUserInfo(username, userRole);
String role = JwtTokenUtil.getUserRole(token);
if (username != null) {

Loading…
Cancel
Save