private String getRedirectionReadyFullRequestPath(MessageContext messageContext) {

    String fullResourceURL =
        (String) messageContext.getProperty(RESTConstants.REST_FULL_REQUEST_PATH);

    // If the request has come though the default Synapse API (without versioning) remove the
    // version part of the URL.
    org.apache.axis2.context.MessageContext axis2MessageContext =
        ((Axis2MessageContext) messageContext).getAxis2MessageContext();
    Map<String, Object> headers =
        (Map<String, Object>)
            axis2MessageContext.getProperty(
                org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);

    String hasRequestedThoughDefaultVersion =
        (String) headers.get(AppMConstants.GATEWAY_DEFAULT_VERSION_INDICATION_HEADER_NAME);

    if (hasRequestedThoughDefaultVersion != null
        && Boolean.parseBoolean(hasRequestedThoughDefaultVersion)) {
      String webAppVersion =
          (String) messageContext.getProperty(RESTConstants.SYNAPSE_REST_API_VERSION);
      return fullResourceURL.replaceFirst("/" + webAppVersion, "");
    }

    return fullResourceURL;
  }
 private boolean shouldSendSAMLResponseToBackend() {
   return Boolean.valueOf(
       configuration.getFirstProperty(
           AppMConstants.API_CONSUMER_AUTHENTICATION_ADD_SAML_RESPONSE_HEADER_TO_OUT_MSG));
 }