提交 ef32e9a7 编写于 作者: E Evan

chore: add some annotations

上级 b48bb215
...@@ -18,12 +18,14 @@ public class WJRealm extends AuthorizingRealm { ...@@ -18,12 +18,14 @@ public class WJRealm extends AuthorizingRealm {
@Autowired @Autowired
private UserService userService; private UserService userService;
// 简单重写获取授权信息方法
@Override @Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) { protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
SimpleAuthorizationInfo s = new SimpleAuthorizationInfo(); SimpleAuthorizationInfo s = new SimpleAuthorizationInfo();
return s; return s;
} }
// 获取认证信息,即根据 token 中的用户名从数据库中获取密码、盐等并返回
@Override @Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
String userName = token.getPrincipal().toString(); String userName = token.getPrincipal().toString();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册