Class OPAUtils

java.lang.Object
org.apache.synapse.mediators.opa.OPAUtils

public class OPAUtils extends Object
  • Constructor Details

    • OPAUtils

      public OPAUtils()
  • Method Details

    • 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 context
      e - OPASecurityException