This commit is contained in:
wangjinlei
2024-03-19 14:15:11 +08:00
parent d099c05e90
commit c536752f14
3 changed files with 6 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import java.util.Date;
@@ -35,6 +36,8 @@ public class OAuth2Realm extends AuthorizingRealm {
private ShiroService shiroService;
@Autowired
private SysUserTokenService sysUserTokenService;
@Autowired
private Environment environment;
@Override
public boolean supports(AuthenticationToken token) {