Package org.apache.shiro.web.mgt
Class DefaultWebSecurityManager
- java.lang.Object
-
- org.apache.shiro.mgt.CachingSecurityManager
-
- org.apache.shiro.mgt.RealmSecurityManager
-
- org.apache.shiro.mgt.AuthenticatingSecurityManager
-
- org.apache.shiro.mgt.AuthorizingSecurityManager
-
- org.apache.shiro.mgt.SessionsSecurityManager
-
- org.apache.shiro.mgt.DefaultSecurityManager
-
- org.apache.shiro.web.mgt.DefaultWebSecurityManager
-
- All Implemented Interfaces:
org.apache.shiro.authc.Authenticator,org.apache.shiro.authz.Authorizer,org.apache.shiro.cache.CacheManagerAware,org.apache.shiro.event.EventBusAware,org.apache.shiro.mgt.SecurityManager,org.apache.shiro.session.mgt.SessionManager,org.apache.shiro.util.Destroyable,WebSecurityManager
public class DefaultWebSecurityManager extends org.apache.shiro.mgt.DefaultSecurityManager implements WebSecurityManager
DefaultWebSecurityManagerimplementation used in web-based applications or any application that requires HTTP connectivity (SOAP, http remoting, etc).- Since:
- 0.2
-
-
Field Summary
Fields Modifier and Type Field Description static StringHTTP_SESSION_MODEDeprecated.static StringNATIVE_SESSION_MODEDeprecated.
-
Constructor Summary
Constructors Constructor Description DefaultWebSecurityManager()DefaultWebSecurityManager(Collection<org.apache.shiro.realm.Realm> realms)DefaultWebSecurityManager(org.apache.shiro.realm.Realm singleRealm)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidafterSessionManagerSet()protected voidbeforeLogout(org.apache.shiro.subject.Subject subject)protected org.apache.shiro.subject.SubjectContextcopy(org.apache.shiro.subject.SubjectContext subjectContext)protected org.apache.shiro.session.mgt.SessionContextcreateSessionContext(org.apache.shiro.subject.SubjectContext subjectContext)protected org.apache.shiro.session.mgt.SessionManagercreateSessionManager(String sessionMode)protected org.apache.shiro.subject.SubjectContextcreateSubjectContext()protected org.apache.shiro.session.mgt.SessionKeygetSessionKey(org.apache.shiro.subject.SubjectContext context)StringgetSessionMode()Deprecated.booleanisHttpSessionMode()Security information needs to be retained from request to request, so Shiro makes use of a session for this.protected voidremoveRequestIdentity(org.apache.shiro.subject.Subject subject)voidsetSessionManager(org.apache.shiro.session.mgt.SessionManager sessionManager)voidsetSessionMode(String sessionMode)Deprecated.since 1.2voidsetSubjectDAO(org.apache.shiro.mgt.SubjectDAO subjectDAO)-
Methods inherited from class org.apache.shiro.mgt.DefaultSecurityManager
bind, createSubject, createSubject, delete, doCreateSubject, ensureSecurityManager, getRememberedIdentity, getRememberMeManager, getSubjectDAO, getSubjectFactory, login, logout, onFailedLogin, onSuccessfulLogin, rememberMeFailedLogin, rememberMeLogout, rememberMeSuccessfulLogin, resolveContextSession, resolvePrincipals, resolveSession, save, setRememberMeManager, setSubjectFactory, stopSession, unbind
-
Methods inherited from class org.apache.shiro.mgt.SessionsSecurityManager
afterCacheManagerSet, afterEventBusSet, applyCacheManagerToSessionManager, applyEventBusToSessionManager, destroy, getSession, getSessionManager, start
-
Methods inherited from class org.apache.shiro.mgt.AuthorizingSecurityManager
afterRealmsSet, checkPermission, checkPermission, checkPermissions, checkPermissions, checkRole, checkRoles, checkRoles, getAuthorizer, hasAllRoles, hasRole, hasRoles, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, setAuthorizer
-
Methods inherited from class org.apache.shiro.mgt.AuthenticatingSecurityManager
authenticate, getAuthenticator, setAuthenticator
-
Methods inherited from class org.apache.shiro.mgt.RealmSecurityManager
applyCacheManagerToRealms, applyEventBusToRealms, getRealms, setRealm, setRealms
-
Methods inherited from class org.apache.shiro.mgt.CachingSecurityManager
applyEventBusToCacheManager, getCacheManager, getEventBus, setCacheManager, setEventBus
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
HTTP_SESSION_MODE
@Deprecated public static final String HTTP_SESSION_MODE
Deprecated.- See Also:
- Constant Field Values
-
NATIVE_SESSION_MODE
@Deprecated public static final String NATIVE_SESSION_MODE
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultWebSecurityManager
public DefaultWebSecurityManager()
-
DefaultWebSecurityManager
public DefaultWebSecurityManager(org.apache.shiro.realm.Realm singleRealm)
-
DefaultWebSecurityManager
public DefaultWebSecurityManager(Collection<org.apache.shiro.realm.Realm> realms)
-
-
Method Detail
-
createSubjectContext
protected org.apache.shiro.subject.SubjectContext createSubjectContext()
- Overrides:
createSubjectContextin classorg.apache.shiro.mgt.DefaultSecurityManager
-
setSubjectDAO
public void setSubjectDAO(org.apache.shiro.mgt.SubjectDAO subjectDAO)
- Overrides:
setSubjectDAOin classorg.apache.shiro.mgt.DefaultSecurityManager
-
afterSessionManagerSet
protected void afterSessionManagerSet()
- Overrides:
afterSessionManagerSetin classorg.apache.shiro.mgt.SessionsSecurityManager
-
copy
protected org.apache.shiro.subject.SubjectContext copy(org.apache.shiro.subject.SubjectContext subjectContext)
- Overrides:
copyin classorg.apache.shiro.mgt.DefaultSecurityManager
-
getSessionMode
@Deprecated public String getSessionMode()
Deprecated.
-
setSessionMode
@Deprecated public void setSessionMode(String sessionMode)
Deprecated.since 1.2- Parameters:
sessionMode-
-
setSessionManager
public void setSessionManager(org.apache.shiro.session.mgt.SessionManager sessionManager)
- Overrides:
setSessionManagerin classorg.apache.shiro.mgt.SessionsSecurityManager
-
isHttpSessionMode
public boolean isHttpSessionMode()
Description copied from interface:WebSecurityManagerSecurity information needs to be retained from request to request, so Shiro makes use of a session for this. Typically, a security manager will use the servlet container's HTTP session but custom session implementations, for example based on EhCache, may also be used. This method indicates whether the security manager is using the HTTP session or not.- Specified by:
isHttpSessionModein interfaceWebSecurityManager- Returns:
trueif the security manager is using the HTTP session; otherwise,false.- Since:
- 1.0
-
createSessionManager
protected org.apache.shiro.session.mgt.SessionManager createSessionManager(String sessionMode)
-
createSessionContext
protected org.apache.shiro.session.mgt.SessionContext createSessionContext(org.apache.shiro.subject.SubjectContext subjectContext)
- Overrides:
createSessionContextin classorg.apache.shiro.mgt.DefaultSecurityManager
-
getSessionKey
protected org.apache.shiro.session.mgt.SessionKey getSessionKey(org.apache.shiro.subject.SubjectContext context)
- Overrides:
getSessionKeyin classorg.apache.shiro.mgt.DefaultSecurityManager
-
beforeLogout
protected void beforeLogout(org.apache.shiro.subject.Subject subject)
- Overrides:
beforeLogoutin classorg.apache.shiro.mgt.DefaultSecurityManager
-
removeRequestIdentity
protected void removeRequestIdentity(org.apache.shiro.subject.Subject subject)
-
-