Package ddf.security.service.impl
Class AbstractAuthorizingRealm
java.lang.Object
org.apache.shiro.realm.CachingRealm
org.apache.shiro.realm.AuthenticatingRealm
org.apache.shiro.realm.AuthorizingRealm
ddf.security.service.impl.AbstractAuthorizingRealm
- All Implemented Interfaces:
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.realm.Realm,org.apache.shiro.util.Initializable,org.apache.shiro.util.Nameable
public abstract class AbstractAuthorizingRealm
extends org.apache.shiro.realm.AuthorizingRealm
Abstraction class used to perform authorization for a realm. This class contains generic methods
that can be used to parse out the credentials from an incoming security token. It also handles
caching tokens for later use.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) voidaddMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion) voidaddUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) voidaddUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion) protected org.apache.shiro.authz.AuthorizationInfodoGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principalCollection) Takes the security attributes about the subject of the incoming security token and builds sets of permissions and roles for use in further checking.protected List<org.apache.shiro.authz.Permission>expandPermissions(List<org.apache.shiro.authz.Permission> permissions) voidremoveMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) voidremoveUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) Methods inherited from class org.apache.shiro.realm.AuthorizingRealm
afterCacheManagerSet, 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, onInit, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolverMethods inherited from class org.apache.shiro.realm.AuthenticatingRealm
assertCredentialsMatch, clearCachedAuthenticationInfo, doGetAuthenticationInfo, 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, setCacheManager, setCachingEnabledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.shiro.util.Initializable
init
-
Field Details
-
Constructor Details
-
AbstractAuthorizingRealm
public AbstractAuthorizingRealm()
-
-
Method Details
-
addUserExpansion
public void addUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) -
addUserExpansion
public void addUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion) -
removeUserExpansion
public void removeUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) -
addMetacardExpansion
public void addMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) -
addMetacardExpansion
public void addMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion) -
removeMetacardExpansion
public void removeMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef) -
doGetAuthorizationInfo
protected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principalCollection) Takes the security attributes about the subject of the incoming security token and builds sets of permissions and roles for use in further checking.- Specified by:
doGetAuthorizationInfoin classorg.apache.shiro.realm.AuthorizingRealm- Parameters:
principalCollection- holds the security assertions for the primary principal of this request- Returns:
- a new collection of permissions and roles corresponding to the security assertions
- Throws:
org.apache.shiro.authz.AuthorizationException- if there are no security assertions associated with this principal collection or if the token cannot be processed successfully.
-
expandPermissions
-