|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.security.sso.spnego.SpnegoFilter
public class SpnegoFilter
Filter that stores a ServletSpnegoHandler in session attribute
com.taglab.support.spnego.SpnegoFilter. It then invokes
ServletSpnegoHandler.authenticate(HttpServletRequest, HttpServletResponse)
to perform any necessary authorization. If the authorization is successful,
the chain is processed. If the authorization fails, a 403 Forbidden reponse
code is sent.
The filter does by default catch exceptions to not display stack traces in
the browser. Wether or not to catch them can be controlled by the init
parameter catchExceptions. If an exception is caught, a 500
response is sent to the client and the stack trace dumped to stdout.
setCatchExceptions(boolean).
Upon successfully established context, the filter can instead of letting the
request through the chain, optionally redirect to another url. This is set
with init parameter redirectOnEstablished. The path is webapp
relative. setRedirectOnEstablished(String).
If the context is fails, the filter can instead of doing a 403 Forbidden
redirect to another url. This is set with init parameter
redirectOnFailed. The path is webapp relative.
setRedirectOnFailed(String).
| Field Summary | |
|---|---|
static String |
HANDLER_ATTRIBUTE_KEY
Deprecated. The name of the session attribute we bind the handler to. |
| Constructor Summary | |
|---|---|
SpnegoFilter()
Deprecated. |
|
| Method Summary | |
|---|---|
static ServletSpnegoHandler |
bindNewServletSpnegoHandlerInSession(javax.servlet.http.HttpServletRequest request)
Deprecated. Utility method for setting a new ServletSpnegoHandler in the session. |
void |
destroy()
Deprecated. |
void |
doFilter(javax.servlet.ServletRequest inrequest,
javax.servlet.ServletResponse inresponse,
javax.servlet.FilterChain chain)
Deprecated. |
static ServletSpnegoHandler |
extractServletSpnegoHandlerFromSession(javax.servlet.http.HttpServletRequest request)
Deprecated. Utility method for obtaining the ServletSpnegoHandler bound to the session. |
void |
init(javax.servlet.FilterConfig config)
Deprecated. |
void |
setCatchExceptions(boolean catchExceptions)
Deprecated. |
void |
setRedirectOnEstablished(String redirectOnEstablished)
Deprecated. |
void |
setRedirectOnFailed(String redirectOnFailed)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HANDLER_ATTRIBUTE_KEY
| Constructor Detail |
|---|
public SpnegoFilter()
| Method Detail |
|---|
public void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest inrequest,
javax.servlet.ServletResponse inresponse,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOException
javax.servlet.ServletExceptionpublic static ServletSpnegoHandler extractServletSpnegoHandlerFromSession(javax.servlet.http.HttpServletRequest request)
ServletSpnegoHandler bound to the session.
request - HttpServletRequest.
public static ServletSpnegoHandler bindNewServletSpnegoHandlerInSession(javax.servlet.http.HttpServletRequest request)
ServletSpnegoHandler in the session.
request - HttpServletRequest.
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void setCatchExceptions(boolean catchExceptions)
catchExceptions - the catchExceptions to setpublic void setRedirectOnEstablished(String redirectOnEstablished)
redirectOnEstablished - the redirectOnEstablished to setpublic void setRedirectOnFailed(String redirectOnFailed)
redirectOnFailed - the redirectOnFailed to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||