Class 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 Detail

      • CIDROperations

        public CIDROperations()
    • 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