Package org.apache.synapse.mediators.opa
Class OPAUtils
java.lang.Object
org.apache.synapse.mediators.opa.OPAUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetRequestIp(org.apache.axis2.context.MessageContext axis2MessageContext) Get the request originated IP from the message contentstatic voidhandlePolicyFailure(org.apache.synapse.MessageContext messageContext, OPASecurityException e, String faultHandler) Handle the policy failure.
-
Constructor Details
-
OPAUtils
public OPAUtils()
-
-
Method Details
-
getRequestIp
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
-