Class IpAddressMatcher
java.lang.Object
org.springframework.security.web.util.matcher.IpAddressMatcher
- All Implemented Interfaces:
- RequestMatcher
Matches a request based on IP Address or subnet mask matching against the remote
 address.
 
Both IPv6 and IPv4 addresses are supported, but a matcher which is configured with an IPv4 address will never match a request which returns an IPv6 address, and vice-versa.
- Since:
- 3.0.2
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.security.web.util.matcher.RequestMatcherRequestMatcher.MatchResult
- 
Constructor SummaryConstructorsConstructorDescriptionIpAddressMatcher(String ipAddress) Takes a specific IP address or a range specified using the IP/Netmask (e.g.
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.web.util.matcher.RequestMatchermatcher
- 
Constructor Details- 
IpAddressMatcherTakes a specific IP address or a range specified 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.
 
 
- 
- 
Method Details- 
matchespublic boolean matches(jakarta.servlet.http.HttpServletRequest request) Description copied from interface:RequestMatcherDecides whether the rule implemented by the strategy matches the supplied request.- Specified by:
- matchesin interface- RequestMatcher
- Parameters:
- request- the request to check for a match
- Returns:
- true if the request matches, false otherwise
 
- 
matches
 
-