CWTRPC
0.9.0

de.itsvs.cwtrpc.security
Class RpcSessionManagementFilter

java.lang.Object
  extended by org.springframework.web.filter.GenericFilterBean
      extended by de.itsvs.cwtrpc.security.RpcSessionManagementFilter
All Implemented Interfaces:
Filter, BeanNameAware, DisposableBean, InitializingBean, ServletContextAware

public class RpcSessionManagementFilter
extends GenericFilterBean

Since:
0.9
Author:
Volker Schmidt

Field Summary
protected static String APPLIED_SESSION_AUTHENTICATION_STRATEGIES_ATTR_NAME
           
protected static String INVALID_SESSION_TEXT
           
protected static String PROCESSED_ALREADY_ATTR_NAME
           
 
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
 
Constructor Summary
RpcSessionManagementFilter()
           
 
Method Summary
 void afterPropertiesSet()
           
static boolean appliedSessionAuthenticationStrategy(HttpServletRequest request, SessionAuthenticationStrategy strategy)
           
protected  void applySessionAuthenticationStrategy(Authentication authentication, HttpServletRequest request, HttpServletResponse response)
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 AuthenticationFailureHandler getAuthenticationFailureHandler()
           
 AuthenticationTrustResolver getAuthenticationTrustResolver()
           
 RedirectStrategy getInvalidSessionRedirectStrategy()
           
 String getInvalidSessionUrl()
           
 RpcHttpSessionStrategy getRpcHttpSessionStrategy()
           
 SecurityContextRepository getSecurityContextRepository()
           
 SessionAuthenticationStrategy getSessionAuthenticationStrategy()
           
protected  void invalidateSession(HttpServletRequest request)
           
protected  boolean process(HttpServletRequest request, HttpServletResponse response)
           
protected  boolean processNewContext(HttpServletRequest request, HttpServletResponse response)
           
protected  boolean processUnauthenticatedRequest(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
           
static void saveAppliedSessionAuthenticationStrategy(HttpServletRequest request, SessionAuthenticationStrategy strategy)
           
protected  boolean saveSecurityContext(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
           
 void setAuthenticationFailureHandler(AuthenticationFailureHandler authenticationFailureHandler)
           
 void setInvalidSessionRedirectStrategy(RedirectStrategy invalidSessionRedirectStrategy)
           
 void setInvalidSessionUrl(String invalidSessionUrl)
           
 void setRpcHttpSessionStrategy(RpcHttpSessionStrategy rpcHttpSessionStrategy)
           
 void setSecurityContextRepository(SecurityContextRepository securityContextRepository)
           
 void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionAuthenticationStrategy)
           
protected  void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception)
           
 
Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setServletContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROCESSED_ALREADY_ATTR_NAME

protected static final String PROCESSED_ALREADY_ATTR_NAME

APPLIED_SESSION_AUTHENTICATION_STRATEGIES_ATTR_NAME

protected static final String APPLIED_SESSION_AUTHENTICATION_STRATEGIES_ATTR_NAME

INVALID_SESSION_TEXT

protected static final String INVALID_SESSION_TEXT
See Also:
Constant Field Values
Constructor Detail

RpcSessionManagementFilter

public RpcSessionManagementFilter()
Method Detail

saveAppliedSessionAuthenticationStrategy

public static void saveAppliedSessionAuthenticationStrategy(HttpServletRequest request,
                                                            SessionAuthenticationStrategy strategy)

appliedSessionAuthenticationStrategy

public static boolean appliedSessionAuthenticationStrategy(HttpServletRequest request,
                                                           SessionAuthenticationStrategy strategy)

getSecurityContextRepository

public SecurityContextRepository getSecurityContextRepository()

setSecurityContextRepository

public void setSecurityContextRepository(SecurityContextRepository securityContextRepository)

getAuthenticationFailureHandler

public AuthenticationFailureHandler getAuthenticationFailureHandler()

setAuthenticationFailureHandler

public void setAuthenticationFailureHandler(AuthenticationFailureHandler authenticationFailureHandler)

getSessionAuthenticationStrategy

public SessionAuthenticationStrategy getSessionAuthenticationStrategy()

setSessionAuthenticationStrategy

public void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionAuthenticationStrategy)

getAuthenticationTrustResolver

public AuthenticationTrustResolver getAuthenticationTrustResolver()

getInvalidSessionRedirectStrategy

public RedirectStrategy getInvalidSessionRedirectStrategy()

setInvalidSessionRedirectStrategy

public void setInvalidSessionRedirectStrategy(RedirectStrategy invalidSessionRedirectStrategy)

getInvalidSessionUrl

public String getInvalidSessionUrl()

setInvalidSessionUrl

public void setInvalidSessionUrl(String invalidSessionUrl)

getRpcHttpSessionStrategy

public RpcHttpSessionStrategy getRpcHttpSessionStrategy()

setRpcHttpSessionStrategy

public void setRpcHttpSessionStrategy(RpcHttpSessionStrategy rpcHttpSessionStrategy)

afterPropertiesSet

public void afterPropertiesSet()
                        throws ServletException
Specified by:
afterPropertiesSet in interface InitializingBean
Overrides:
afterPropertiesSet in class GenericFilterBean
Throws:
ServletException

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Throws:
IOException
ServletException

process

protected boolean process(HttpServletRequest request,
                          HttpServletResponse response)
                   throws IOException,
                          ServletException
Throws:
IOException
ServletException

processNewContext

protected boolean processNewContext(HttpServletRequest request,
                                    HttpServletResponse response)
                             throws IOException,
                                    ServletException
Throws:
IOException
ServletException

saveSecurityContext

protected boolean saveSecurityContext(HttpServletRequest request,
                                      HttpServletResponse response,
                                      Authentication authentication)
                               throws IOException,
                                      ServletException
Throws:
IOException
ServletException

applySessionAuthenticationStrategy

protected void applySessionAuthenticationStrategy(Authentication authentication,
                                                  HttpServletRequest request,
                                                  HttpServletResponse response)
                                           throws IOException,
                                                  ServletException
Throws:
IOException
ServletException

unsuccessfulAuthentication

protected void unsuccessfulAuthentication(HttpServletRequest request,
                                          HttpServletResponse response,
                                          AuthenticationException exception)
                                   throws IOException,
                                          ServletException
Throws:
IOException
ServletException

processUnauthenticatedRequest

protected boolean processUnauthenticatedRequest(HttpServletRequest request,
                                                HttpServletResponse response,
                                                Authentication authentication)
                                         throws IOException,
                                                ServletException
Throws:
IOException
ServletException

invalidateSession

protected void invalidateSession(HttpServletRequest request)

Controlled
Web Toolkit RPC

Copyright 2011 IT Services VS GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.