Class Utils
java.lang.Object
org.apache.synapse.commons.throttle.module.utils.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractCustomerKeyFromAuthHeader(String authHeader) Extract the customer key from the OAuth Authentication headerstatic booleanisIpInRange(String address, String range) Check whether a given Ip is in a given ip rangestatic void
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
isIpInRange
Check whether a given Ip is in a given ip range- Parameters:
address- ip address to checkrange- 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
Extract the customer key from the OAuth Authentication header- Parameters:
authHeader- Header string- Returns:
- extracted customer key value
-
main
- Throws:
UnknownHostException
-