Spring Extensions

com.myjeeva.spring.security.secureuri
Class SecureServerURI

java.lang.Object
  extended by com.myjeeva.spring.security.secureuri.SecureServerURI
All Implemented Interfaces:
javax.servlet.Filter

public class SecureServerURI
extends Object
implements javax.servlet.Filter

SecureServerURI is Filter implementation that being invoked by Spring org.springframework.web.filter.DelegatingFilterProxy mapped in web.xml

Filter configuration looks like-

        <filter>
                <filter-name>secureUriFilter</filter-name>
                <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
        </filter>
 
        <filter-mapping>
                <filter-name>secureUriFilter</filter-name>
                <url-pattern>/data/secure/*</url-pattern>
        </filter-mapping>
        
        <filter-mapping>
                <filter-name>secureUriFilter</filter-name>
                <url-pattern>/protected/*</url-pattern>
        </filter-mapping>

So doFilter(ServletRequest, ServletResponse, FilterChain) method applies the Ant-style path patterns & hashing logic for link validation.

Since:
v1.0.1
Author:
Jeevanandam ([email protected])

Constructor Summary
SecureServerURI()
           
 
Method Summary
 void destroy()
          
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          
 void init(javax.servlet.FilterConfig filterConfig)
          
 void setSecureUriMapper(SecureUriMapper secureUriMapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureServerURI

public SecureServerURI()
Method Detail

setSecureUriMapper

public void setSecureUriMapper(SecureUriMapper secureUriMapper)
Parameters:
secureUriMapper - the secureUriMapper to set

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException
See Also:
Filter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException

Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException
See Also:
Filter.init(javax.servlet.FilterConfig)

destroy

public void destroy()

Specified by:
destroy in interface javax.servlet.Filter
See Also:
Filter.destroy()

Spring Extensions

Copyright © 2010-2012 www.myjeeva.com, All rights reserved.

The copyright of the pages and contents on this website is with myjeeva.com and the content is licensed under Creative Commons Attribution-Share Alike 3.0 Unported License. Libraries and code snippets on myjeeva.com has license information.