public class

WebSecurityExpressionRoot

extends SecurityExpressionRoot
java.lang.Object
   ↳ org.springframework.security.access.expression.SecurityExpressionRoot
     ↳ org.springframework.security.web.access.expression.WebSecurityExpressionRoot

Summary

Fields
public final HttpServletRequest request Allows direct access to the request object
[Expand]
Inherited Fields
From class org.springframework.security.access.expression.SecurityExpressionRoot
Public Constructors
WebSecurityExpressionRoot(Authentication a, FilterInvocation fi)
Public Methods
boolean hasIpAddress(String ipAddress)
Takes a specific IP address or a range using the IP/Netmask (e.g.
[Expand]
Inherited Methods
From class org.springframework.security.access.expression.SecurityExpressionRoot
From class java.lang.Object

Fields

public final HttpServletRequest request

Allows direct access to the request object

Public Constructors

public WebSecurityExpressionRoot (Authentication a, FilterInvocation fi)

Public Methods

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.