org.apache.synapse.mediators.opa

## Class OPAUtils

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

-     public class OPAUtils
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OPAUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getRequestIp(org.apache.axis2.context.MessageContext axis2MessageContext)` Get the request originated IP from the message content
    `static void` | `handlePolicyFailure(org.apache.synapse.MessageContext messageContext, OPASecurityException e, java.lang.String faultHandler)` Handle the policy failure.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OPAUtils

          public OPAUtils()

  - ### Method Detail

    - #### getRequestIp

          public static java.lang.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,
                                                 java.lang.String faultHandler)

      Handle the policy failure. This can be an internal error or access revoked by the policy
      Parameters:
        `messageContext` - Message context
        `e` - OPASecurityException

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.