Package com.pingidentity.sdk
Class CIDROperations
- java.lang.Object
-
- com.pingidentity.sdk.CIDROperations
-
public class CIDROperations extends Object
Provided as a helper class for CIDR operations.
An example OGNL Expression might look like this:#val = @com.pingidentity.sdk.CIDROperations@isInRange(#this.get("context.ClientIp"),"fe80::74da:14b:76d1:eba3/128")- Since:
- 8.1
-
-
Constructor Summary
Constructors Constructor Description CIDROperations()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisInRange(String ipAddress, String cidr)Determines if the given IP address is within the specified CIDR range.
-
-
-
Method Detail
-
isInRange
public static boolean isInRange(String ipAddress, String cidr) throws UnknownHostException
Determines if the given IP address is within the specified CIDR range. It supports both IPv4 and IPv6.- Parameters:
ipAddress- The IP address to compare against the CIDR range.cidr- The CIDR range.- Returns:
- true if the specified IP address is within the specified CIDR range, false otherwise.
- Throws:
UnknownHostException
-
-