SessionsSecurityManager

Shiro support of a {@link SecurityManager} class hierarchy that delegates all {@link hunt.shiro.session.Session session} operations to a wrapped {@link hunt.shiro.session.mgt.SessionManager SessionManager} instance. That is, this class implements the methods in the {@link SessionManager SessionManager} interface, but in reality, those methods are merely passthrough calls to the underlying 'real' {@code SessionManager} instance. <p/> The remaining {@code SecurityManager} methods not implemented by this class or its parents are left to be implemented by subclasses. <p/> In keeping with the other classes in this hierarchy and Shiro's desire to minimize configuration whenever possible, suitable default instances for all dependencies will be created upon instantiation.

Constructors

this
this()

Default no-arg constructor, internally creates a suitable default {@link SessionManager SessionManager} delegate instance.

Members

Functions

afterCacheManagerSet
void afterCacheManagerSet()

Calls {@link hunt.shiro.mgt.AuthorizingSecurityManager#afterCacheManagerSet() super.afterCacheManagerSet()} and then immediately calls {@link #applyCacheManagerToSessionManager() applyCacheManagerToSessionManager()} to ensure the <code>CacheManager</code> is applied to the SessionManager as necessary.

afterEventBusSet
void afterEventBusSet()

Sets any configured EventBus on the SessionManager if necessary.

afterSessionManagerSet
void afterSessionManagerSet()
Undocumented in source. Be warned that the author may not have intended to support it.
applyCacheManagerToSessionManager
void applyCacheManagerToSessionManager()

Ensures the internal delegate <code>SessionManager</code> is injected with the newly set {@link #setCacheManager CacheManager} so it may use it for its internal caching needs. <p/> Note: This implementation only injects the CacheManager into the SessionManager if the SessionManager instance implements the {@link CacheManagerAware CacheManagerAware} interface.

applyEventBusToSessionManager
void applyEventBusToSessionManager()

Ensures the internal delegate <code>SessionManager</code> is injected with the newly set {@link #setEventBus EventBus} so it may use it for its internal event needs. <p/> Note: This implementation only injects the EventBus into the SessionManager if the SessionManager instance implements the {@link EventBusAware EventBusAware} interface.

destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
getSession
Session getSession(SessionKey key)
Undocumented in source. Be warned that the author may not have intended to support it.
getSessionManager
SessionManager getSessionManager()

Returns this security manager's internal delegate {@link SessionManager SessionManager}.

setSessionManager
void setSessionManager(SessionManager sessionManager)

Sets the underlying delegate {@link SessionManager} instance that will be used to support this implementation's <tt>SessionManager</tt> method calls. <p/> This <tt>SecurityManager</tt> implementation does not provide logic to support the inherited <tt>SessionManager</tt> interface, but instead delegates these calls to an internal <tt>SessionManager</tt> instance. <p/> If a <tt>SessionManager</tt> instance is not set, a default one will be automatically created and initialized appropriately for the the existing runtime environment.

start
Session start(SessionContext context)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From AuthorizingSecurityManager

getAuthorizer
Authorizer getAuthorizer()

Returns the underlying wrapped <tt>Authorizer</tt> instance to which this <tt>SecurityManager</tt> implementation delegates all of its authorization calls.

setAuthorizer
void setAuthorizer(Authorizer authorizer)

Sets the underlying <tt>Authorizer</tt> instance to which this <tt>SecurityManager</tt> implementation will delegate all of its authorization calls.

afterRealmsSet
void afterRealmsSet()

First calls <code>super.afterRealmsSet()</code> and then sets these same <code>Realm</code> objects on this instance's wrapped {@link Authorizer Authorizer}. <p/> The setting of realms the Authorizer will only occur if it is an instance of {@link hunt.shiro.authz.ModularRealmAuthorizer ModularRealmAuthorizer}, that is: <pre> if ( this.authorizer instanceof ModularRealmAuthorizer ) { ((ModularRealmAuthorizer)this.authorizer).setRealms(realms); }</pre>

destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool isPermitted(PrincipalCollection principals, string permissionString)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool isPermitted(PrincipalCollection principals, Permission permission)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool[] isPermitted(PrincipalCollection principals, string[] permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool[] isPermitted(PrincipalCollection principals, List!(Permission) permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermittedAll
bool isPermittedAll(PrincipalCollection principals, string[] permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermittedAll
bool isPermittedAll(PrincipalCollection principals, Collection!(Permission) permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPermission
void checkPermission(PrincipalCollection principals, string permission)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPermission
void checkPermission(PrincipalCollection principals, Permission permission)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPermissions
void checkPermissions(PrincipalCollection principals, string[] permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPermissions
void checkPermissions(PrincipalCollection principals, Collection!(Permission) permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
hasRole
bool hasRole(PrincipalCollection principals, string roleIdentifier)
Undocumented in source. Be warned that the author may not have intended to support it.
hasRoles
bool[] hasRoles(PrincipalCollection principals, List!(string) roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
hasRoles
bool[] hasRoles(PrincipalCollection principals, string[] roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
hasAllRoles
bool hasAllRoles(PrincipalCollection principals, Collection!(string) roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
hasAllRoles
bool hasAllRoles(PrincipalCollection principals, string[] roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
checkRole
void checkRole(PrincipalCollection principals, string role)
Undocumented in source. Be warned that the author may not have intended to support it.
checkRoles
void checkRoles(PrincipalCollection principals, Collection!(string) roles)
Undocumented in source. Be warned that the author may not have intended to support it.
checkRoles
void checkRoles(PrincipalCollection principals, string[] roles)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta