diff --git a/hsweb-authorization/hsweb-authorization-shiro/src/main/java/org/hswebframework/web/authorization/shiro/ListenerAuthorizingRealm.java b/hsweb-authorization/hsweb-authorization-shiro/src/main/java/org/hswebframework/web/authorization/shiro/ListenerAuthorizingRealm.java index 6f32c9d23..d50375742 100644 --- a/hsweb-authorization/hsweb-authorization-shiro/src/main/java/org/hswebframework/web/authorization/shiro/ListenerAuthorizingRealm.java +++ b/hsweb-authorization/hsweb-authorization-shiro/src/main/java/org/hswebframework/web/authorization/shiro/ListenerAuthorizingRealm.java @@ -25,7 +25,6 @@ import org.apache.shiro.authc.SimpleAuthenticationInfo; import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.authz.permission.WildcardPermission; -import org.apache.shiro.cache.Cache; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.Subject; @@ -72,14 +71,6 @@ public class ListenerAuthorizingRealm extends AuthorizingRealm SecurityUtils.getSubject().logout(); } - protected Cache getCache(String name) { - return getCacheManager().getCache(getCacheName(name)); - } - - protected String getCacheName(String name) { - return "shiro.auth.info.".concat(name); - } - protected AuthorizationInfo createAuthorizationInfo(Authentication authentication) { SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo(); authorizationInfo.addRoles(authentication.getRoles().stream().map(Role::getId).collect(Collectors.toList())); @@ -104,4 +95,5 @@ public class ListenerAuthorizingRealm extends AuthorizingRealm Subject subject = SecurityUtils.getSubject(); subject.login(new SimpleAuthenticationToken(authentication, remember)); } + }