Package org.apache.synapse.mediators.opa
Class OPAUtils
- java.lang.Object
-
- org.apache.synapse.mediators.opa.OPAUtils
-
public class OPAUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description OPAUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getRequestIp(org.apache.axis2.context.MessageContext axis2MessageContext)
Get the request originated IP from the message contentstatic void
handlePolicyFailure(org.apache.synapse.MessageContext messageContext, OPASecurityException e, String faultHandler)
Handle the policy failure.
-
-
-
Method Detail
-
getRequestIp
public static String getRequestIp(org.apache.axis2.context.MessageContext axis2MessageContext)
Get the request originated IP from the message content- Parameters:
axis2MessageContext
- Axis2 message context- Returns:
- IP address as a string
-
handlePolicyFailure
public static void handlePolicyFailure(org.apache.synapse.MessageContext messageContext, OPASecurityException e, String faultHandler)
Handle the policy failure. This can be an internal error or access revoked by the policy- Parameters:
messageContext
- Message contexte
- OPASecurityException
-
-