|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ecyrd.jspwiki.ui.SilverpeasWikiServletFilter
public class SilverpeasWikiServletFilter
Filter that verifies that the WikiEngine is running, and sets the
authentication status for the user's WikiSession. Each HTTP request processed by this filter is
wrapped by a WikiRequestWrapper. The wrapper's primary responsibility is to return the
correct userPrincipal and remoteUser for authenticated JSPWiki users
(whether authenticated by container or by JSPWiki's custom system). The wrapper's other
responsibility is to incorporate JSPWiki built-in roles into the role-checking algorithm for
HttpServletRequest.isUserInRole(String). Just before the request is wrapped, the method
AuthenticationManager.login(HttpServletRequest) executes; this method contains all of the
logic needed to grab any user login credentials set by the container or by cookies.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
protected com.ecyrd.jspwiki.WikiEngine |
m_engine
|
protected static com.stratelia.silverpeas.peasCore.SilverpeasWebUtil |
webUtil
|
| Constructor Summary | |
|---|---|
SilverpeasWikiServletFilter()
Creates a Wiki Servlet Filter. |
|
| Method Summary | |
|---|---|
void |
destroy()
Destroys the WikiServletFilter. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Checks that the WikiEngine is running ok, wraps the current HTTP request, and sets the correct authentication state for the users's WikiSession. |
protected com.ecyrd.jspwiki.WikiContext |
getWikiContext(javax.servlet.ServletRequest request)
Figures out the wiki context from the request. |
void |
init(javax.servlet.FilterConfig config)
Initializes the WikiServletFilter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected com.ecyrd.jspwiki.WikiEngine m_engine
protected static com.stratelia.silverpeas.peasCore.SilverpeasWebUtil webUtil
| Constructor Detail |
|---|
public SilverpeasWikiServletFilter()
| Method Detail |
|---|
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterconfig - The FilterConfig.
javax.servlet.ServletException - If a WikiEngine cannot be started.public void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
AuthenticationManager.login(HttpServletRequest) executes, which sets the authentication
state. Then, the request is wrapped with a WikiRequestWrapper.
doFilter in interface javax.servlet.Filterrequest - the current HTTP request objectresponse - the current HTTP response objectchain - The Filter chain passed down.
javax.servlet.ServletException - if AuthenticationManager.login(HttpServletRequest) fails for
any reason
IOException - If writing to the servlet response fails.protected com.ecyrd.jspwiki.WikiContext getWikiContext(javax.servlet.ServletRequest request)
request - The request to examine
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||