org.springframework.security.web.access.expression
Class WebSecurityExpressionRoot
java.lang.Object
org.springframework.security.access.expression.SecurityExpressionRoot
org.springframework.security.web.access.expression.WebSecurityExpressionRoot
public class WebSecurityExpressionRoot
- extends SecurityExpressionRoot
- Since:
- 3.0
Field Summary |
javax.servlet.http.HttpServletRequest |
request
Allows direct access to the request object |
Method Summary |
boolean |
hasIpAddress(String ipAddress)
Takes a specific IP address or a range using the IP/Netmask (e.g. |
Methods inherited from class org.springframework.security.access.expression.SecurityExpressionRoot |
denyAll, getAuthentication, getPrincipal, hasAnyAuthority, hasAnyRole, hasAuthority, 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 |
request
public final javax.servlet.http.HttpServletRequest request
- Allows direct access to the request object
WebSecurityExpressionRoot
public WebSecurityExpressionRoot(Authentication a,
FilterInvocation fi)
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.