|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.ui.x509.X509ProcessingFilter
public class X509ProcessingFilter
Processes the X.509 certificate submitted by a client browser when HTTPS is used with client-authentication enabled.
An X509AuthenticationToken is created with the certificate as the
credentials.
The configured authentication manager is expected to supply a provider which
can handle this token (usually an instance of X509AuthenticationProvider).
If authentication is successful, an InteractiveAuthenticationSuccessEvent will be
published to the application context. No events will be published if
authentication was unsuccessful, because this would generally be recorded
via an AuthenticationManager-specific application event.
Do not use this class directly. Instead configure
web.xml to use the FilterToBeanProxy.
| Constructor Summary | |
|---|---|
X509ProcessingFilter()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
This method first checks for an existing, non-null authentication in the secure context. |
void |
init(javax.servlet.FilterConfig ignored)
|
void |
setApplicationEventPublisher(ApplicationEventPublisher context)
|
void |
setAuthenticationManager(AuthenticationManager authenticationManager)
|
protected void |
successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Authentication authResult)
Puts the Authentication instance returned by the
authentication manager into the secure context. |
protected void |
unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthenticationException failed)
Ensures the authentication object in the secure context is set to null when authentication fails. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public X509ProcessingFilter()
| Method Detail |
|---|
public void setApplicationEventPublisher(ApplicationEventPublisher context)
setApplicationEventPublisher in interface ApplicationEventPublisherAwarepublic void setAuthenticationManager(AuthenticationManager authenticationManager)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic void destroy()
destroy in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
If no authentication object exists, it attempts to obtain the client
authentication certificate from the request. If there is no certificate
present then authentication is skipped. Otherwise a new authentication
request containing the certificate will be passed to the configured
AuthenticationManager.
If authentication is successful the returned token will be stored in the secure context. Otherwise it will be set to null. In either case, the request proceeds through the filter chain.
doFilter in interface javax.servlet.Filterrequest - DOCUMENT ME!response - DOCUMENT ME!filterChain - DOCUMENT ME!
IOException - DOCUMENT ME!
javax.servlet.ServletException - DOCUMENT ME!
public void init(javax.servlet.FilterConfig ignored)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletException
protected void successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Authentication authResult)
throws IOException
Authentication instance returned by the
authentication manager into the secure context.
request - DOCUMENT ME!response - DOCUMENT ME!authResult - DOCUMENT ME!
IOException - DOCUMENT ME!
protected void unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AuthenticationException failed)
request - DOCUMENT ME!response - DOCUMENT ME!failed - DOCUMENT ME!
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||