Class SampleappShiroFilter

java.lang.Object
org.apache.shiro.web.servlet.ServletContextSupport
org.apache.shiro.web.servlet.AbstractFilter
org.apache.shiro.web.servlet.NameableFilter
org.apache.shiro.web.servlet.OncePerRequestFilter
org.apache.shiro.web.servlet.AbstractShiroFilter
no.priv.bang.sampleapp.web.security.SampleappShiroFilter
All Implemented Interfaces:
javax.servlet.Filter, org.apache.shiro.lang.util.Nameable

public class SampleappShiroFilter extends org.apache.shiro.web.servlet.AbstractShiroFilter
This is an OSGi DS component that provides a Filter service. This filter service will be put in front of the servlets in the "/sampleapp" webcontext, and will handle authentication and verify authorization to the servlet paths.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.apache.shiro.config.Ini
     
    private org.apache.shiro.realm.Realm
     
    private org.apache.shiro.session.mgt.eis.SessionDAO
     

    Fields inherited from class org.apache.shiro.web.servlet.OncePerRequestFilter

    ALREADY_FILTERED_SUFFIX

    Fields inherited from class org.apache.shiro.web.servlet.AbstractFilter

    filterConfig
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    setRealm(org.apache.shiro.realm.Realm realm)
     
    void
    setSession(org.apache.shiro.session.mgt.eis.SessionDAO session)
     

    Methods inherited from class org.apache.shiro.web.servlet.AbstractShiroFilter

    createDefaultSecurityManager, createSubject, doFilterInternal, executeChain, getExecutionChain, getFilterChainResolver, getSecurityManager, init, isHttpSessions, isStaticSecurityManagerEnabled, onFilterConfigSet, prepareServletRequest, prepareServletResponse, setFilterChainResolver, setSecurityManager, setShiroFilterConfiguration, setStaticSecurityManagerEnabled, updateSessionLastAccessTime, wrapServletRequest, wrapServletResponse

    Methods inherited from class org.apache.shiro.web.servlet.OncePerRequestFilter

    doFilter, getAlreadyFilteredAttributeName, isEnabled, isEnabled, isFilterOncePerRequest, setEnabled, setFilterOncePerRequest, shouldNotFilter

    Methods inherited from class org.apache.shiro.web.servlet.NameableFilter

    getName, setName, toStringBuilder

    Methods inherited from class org.apache.shiro.web.servlet.AbstractFilter

    destroy, getFilterConfig, getInitParam, init, setFilterConfig

    Methods inherited from class org.apache.shiro.web.servlet.ServletContextSupport

    getContextAttribute, getContextInitParam, getServletContext, removeContextAttribute, setContextAttribute, setServletContext, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • INI_FILE

      private static final org.apache.shiro.config.Ini INI_FILE
    • realm

      private org.apache.shiro.realm.Realm realm
    • session

      private org.apache.shiro.session.mgt.eis.SessionDAO session
  • Constructor Details

    • SampleappShiroFilter

      public SampleappShiroFilter()
  • Method Details

    • setRealm

      public void setRealm(org.apache.shiro.realm.Realm realm)
    • setSession

      public void setSession(org.apache.shiro.session.mgt.eis.SessionDAO session)
    • activate

      public void activate()