org.zkoss.zkplus.acegi
Class ZkAuthenticationProcessingFilter

java.lang.Object
  extended by org.acegisecurity.ui.AbstractProcessingFilter
      extended by org.acegisecurity.ui.webapp.AuthenticationProcessingFilter
          extended by org.zkoss.zkplus.acegi.ZkAuthenticationProcessingFilter
All Implemented Interfaces:
javax.servlet.Filter, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.MessageSourceAware

public class ZkAuthenticationProcessingFilter
extends org.acegisecurity.ui.webapp.AuthenticationProcessingFilter

This implementation process zk specific popup login page. If send user login sucessfullly, an "onLoginOK" event would be fired to the component that fired the event and caused the login processing. Since it will be tedious to register "onLoginOK" handler on every possible component, it is better to register an onLoginOK event handler on the concerned page.

Applicable to Acegi Security version 1.0.3

Author:
Henri
See Also:
ZkAuthenticationEntryPoint, ShowWindowEventListener

Field Summary
 
Fields inherited from class org.acegisecurity.ui.webapp.AuthenticationProcessingFilter
ACEGI_SECURITY_FORM_PASSWORD_KEY, ACEGI_SECURITY_FORM_USERNAME_KEY, ACEGI_SECURITY_LAST_USERNAME_KEY
 
Fields inherited from class org.acegisecurity.ui.AbstractProcessingFilter
ACEGI_SAVED_REQUEST_KEY, ACEGI_SECURITY_LAST_EXCEPTION_KEY, authenticationDetailsSource, eventPublisher, logger, messages
 
Constructor Summary
ZkAuthenticationProcessingFilter()
           
 
Method Summary
protected  java.lang.String obtainPassword(javax.servlet.http.HttpServletRequest request)
           
protected  java.lang.String obtainUsername(javax.servlet.http.HttpServletRequest request)
           
protected  boolean requiresAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void sendRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String url)
           
 void setSendZkEventAfterSuccessfulAuthentication(boolean b)
          Whether re-send the ZK event that caused poping the login window after authentication successfully.
 
Methods inherited from class org.acegisecurity.ui.webapp.AuthenticationProcessingFilter
attemptAuthentication, getDefaultFilterProcessesUrl, init, setDetails
 
Methods inherited from class org.acegisecurity.ui.AbstractProcessingFilter
afterPropertiesSet, destroy, doFilter, getAuthenticationDetailsSource, getAuthenticationFailureUrl, getAuthenticationManager, getDefaultTargetUrl, getExceptionMappings, getFilterProcessesUrl, getRememberMeServices, isAlwaysUseDefaultTargetUrl, isContinueChainBeforeSuccessfulAuthentication, obtainFullRequestUrl, onPreAuthentication, onSuccessfulAuthentication, onUnsuccessfulAuthentication, setAlwaysUseDefaultTargetUrl, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureUrl, setAuthenticationManager, setContinueChainBeforeSuccessfulAuthentication, setDefaultTargetUrl, setExceptionMappings, setFilterProcessesUrl, setMessageSource, setRememberMeServices, successfulAuthentication, unsuccessfulAuthentication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZkAuthenticationProcessingFilter

public ZkAuthenticationProcessingFilter()
Method Detail

setSendZkEventAfterSuccessfulAuthentication

public void setSendZkEventAfterSuccessfulAuthentication(boolean b)
Whether re-send the ZK event that caused poping the login window after authentication successfully. It is default to false.


requiresAuthentication

protected boolean requiresAuthentication(javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response)
Overrides:
requiresAuthentication in class org.acegisecurity.ui.AbstractProcessingFilter

sendRedirect

protected void sendRedirect(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            java.lang.String url)
                     throws java.io.IOException
Overrides:
sendRedirect in class org.acegisecurity.ui.AbstractProcessingFilter
Throws:
java.io.IOException

obtainPassword

protected java.lang.String obtainPassword(javax.servlet.http.HttpServletRequest request)
Overrides:
obtainPassword in class org.acegisecurity.ui.webapp.AuthenticationProcessingFilter

obtainUsername

protected java.lang.String obtainUsername(javax.servlet.http.HttpServletRequest request)
Overrides:
obtainUsername in class org.acegisecurity.ui.webapp.AuthenticationProcessingFilter


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo