org.springframework.security.web.access.expression
Class WebSecurityExpressionRoot

java.lang.Object
  extended by org.springframework.security.access.expression.SecurityExpressionRoot
      extended by org.springframework.security.web.access.expression.WebSecurityExpressionRoot

public class WebSecurityExpressionRoot
extends SecurityExpressionRoot

Since:
3.0
Version:
$Id: WebSecurityExpressionRoot.java 4003 2009-11-24 09:31:03Z ltaylor $
Author:
Luke Taylor

Field Summary
 HttpServletRequest request
          Allows direct access to the request object
 
Fields inherited from class org.springframework.security.access.expression.SecurityExpressionRoot
authentication, denyAll, permitAll
 
Constructor Summary
WebSecurityExpressionRoot(Authentication a, FilterInvocation fi)
           
 
Method Summary
 boolean hasIpAddress(String ipAddress)
          Takes a specific IP address or a range using the IP/Netmask (e.g. 192.168.1.0/24 or 202.24.0.0/14).
 
Methods inherited from class org.springframework.security.access.expression.SecurityExpressionRoot
denyAll, getAuthentication, getPrincipal, hasAnyRole, hasRole, isAnonymous, isAuthenticated, isFullyAuthenticated, isRememberMe, permitAll, setRoleHierarchy, setTrustResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

public final HttpServletRequest request
Allows direct access to the request object

Constructor Detail

WebSecurityExpressionRoot

public WebSecurityExpressionRoot(Authentication a,
                                 FilterInvocation fi)
Method Detail

hasIpAddress

public boolean hasIpAddress(String ipAddress)
Takes a specific IP address or a range using the IP/Netmask (e.g. 192.168.1.0/24 or 202.24.0.0/14).

Parameters:
ipAddress - the address or range of addresses from which the request must come.
Returns:
true if the IP address of the current request is in the required range.


Copyright © 2004-2009 SpringSource, Inc. All Rights Reserved.