Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • isIpInRange

        public static boolean isIpInRange​(String address,
                                          String range)
                                   throws UnknownHostException
        Check whether a given Ip is in a given ip range
        Parameters:
        address - ip address to check
        range - range ex: 192.168.2.2-192.168.2.100
        Returns:
        true is in range , false if not
        Throws:
        UnknownHostException - If Host is not Valid or can't resolve it
      • extractCustomerKeyFromAuthHeader

        public static String extractCustomerKeyFromAuthHeader​(String authHeader)
        Extract the customer key from the OAuth Authentication header
        Parameters:
        authHeader - Header string
        Returns:
        extracted customer key value