Class ExtendedPropertiesRealm
java.lang.Object
org.apache.shiro.realm.CachingRealm
org.apache.shiro.realm.AuthenticatingRealm
org.apache.shiro.realm.AuthorizingRealm
org.apache.shiro.realm.SimpleAccountRealm
org.apache.shiro.realm.text.TextConfigurationRealm
org.apache.shiro.realm.text.PropertiesRealm
org.tynamo.shiro.extension.realm.text.ExtendedPropertiesRealm
- All Implemented Interfaces:
Runnable,org.apache.shiro.authc.LogoutAware,org.apache.shiro.authz.Authorizer,org.apache.shiro.authz.permission.PermissionResolverAware,org.apache.shiro.authz.permission.RolePermissionResolverAware,org.apache.shiro.cache.CacheManagerAware,org.apache.shiro.lang.util.Destroyable,org.apache.shiro.lang.util.Initializable,org.apache.shiro.lang.util.Nameable,org.apache.shiro.realm.Realm
public class ExtendedPropertiesRealm
extends org.apache.shiro.realm.text.PropertiesRealm
Fixes some bugs with
PropertiesRealm-
Field Summary
Fields inherited from class org.apache.shiro.realm.text.PropertiesRealm
fileLastModified, reloadIntervalSeconds, resourcePath, scheduler, useXmlFormatFields inherited from class org.apache.shiro.realm.SimpleAccountRealm
roles, rolesLock, users, usersLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidRemove initialization after installing cacheManager.protected org.apache.shiro.authc.AuthenticationInfodoGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token) Eliminates the error generating NullPointerException, when trying to register for non-existent account.voidsetCacheManager(org.apache.shiro.cache.CacheManager authzInfoCacheManager) Methods inherited from class org.apache.shiro.realm.text.PropertiesRealm
afterRoleCacheSet, destroy, getName, getRolename, getUsername, isRolename, isUsername, onInit, run, setReloadIntervalSeconds, setResourcePath, setUseXmlFormat, startReloadThreadMethods inherited from class org.apache.shiro.realm.text.TextConfigurationRealm
getRoleDefinitions, getUserDefinitions, processDefinitions, processRoleDefinitions, processRoleDefinitions, processUserDefinitions, processUserDefinitions, setRoleDefinitions, setUserDefinitions, toLines, toMapMethods inherited from class org.apache.shiro.realm.SimpleAccountRealm
accountExists, add, add, addAccount, addAccount, addRole, doGetAuthorizationInfo, getRole, getUser, getUsername, getUsername, roleExists, toSetMethods inherited from class org.apache.shiro.realm.AuthorizingRealm
checkPermission, checkPermission, checkPermission, checkPermissions, checkPermissions, checkPermissions, checkRole, checkRole, checkRoles, checkRoles, checkRoles, clearCachedAuthorizationInfo, doClearCache, getAuthorizationCache, getAuthorizationCacheKey, getAuthorizationCacheName, getAuthorizationInfo, getPermissionResolver, getPermissions, getRolePermissionResolver, hasAllRoles, hasRole, hasRole, hasRoles, hasRoles, isAuthorizationCachingEnabled, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isPermittedAll, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolverMethods inherited from class org.apache.shiro.realm.AuthenticatingRealm
assertCredentialsMatch, clearCachedAuthenticationInfo, getAuthenticationCache, getAuthenticationCacheKey, getAuthenticationCacheKey, getAuthenticationCacheName, getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, init, isAuthenticationCachingEnabled, isAuthenticationCachingEnabled, setAuthenticationCache, setAuthenticationCacheName, setAuthenticationCachingEnabled, setAuthenticationTokenClass, setCredentialsMatcher, supportsMethods inherited from class org.apache.shiro.realm.CachingRealm
clearCache, getAvailablePrincipal, getCacheManager, getName, isCachingEnabled, onLogout, setCachingEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.shiro.lang.util.Initializable
init
-
Constructor Details
-
ExtendedPropertiesRealm
-
-
Method Details
-
doGetAuthenticationInfo
protected org.apache.shiro.authc.AuthenticationInfo doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token) throws org.apache.shiro.authc.AuthenticationException Eliminates the error generating NullPointerException, when trying to register for non-existent account.- Overrides:
doGetAuthenticationInfoin classorg.apache.shiro.realm.SimpleAccountRealm- Throws:
org.apache.shiro.authc.AuthenticationException- See Also:
-
setCacheManager
public void setCacheManager(org.apache.shiro.cache.CacheManager authzInfoCacheManager) - Specified by:
setCacheManagerin interfaceorg.apache.shiro.cache.CacheManagerAware- Overrides:
setCacheManagerin classorg.apache.shiro.realm.CachingRealm
-
afterCacheManagerSet
protected void afterCacheManagerSet()Remove initialization after installing cacheManager. This created problems of premature initialization, when not specified the name of realm, respectively, are generated nekkorektnye account with the name of the default realm, which then changed to the name specified in the config.- Overrides:
afterCacheManagerSetin classorg.apache.shiro.realm.AuthorizingRealm- See Also:
-