有个需求,就是需要再规定ip范围内登录,想用shiro登录授权,怎么个思路实现,nutzboot,,,,,,,,,,
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
SimpleShiroToken upToken = (SimpleShiroToken) token;
User user = dao().fetch(User.class, (Long)upToken.getPrincipal());
if (user == null)
return null;
return new SimpleAccount(user.getId(), user.getPassword(), getName());
}
是在这里实现吗