OpenIG: Parsing a CURL Request with JSON –data and redirect to target

This topic has 1 reply, 2 voices, and was last updated 5 years, 9 months ago by Guillaume Sauthier.

  • Author
    Posts
  • #13913
     Fehmi M’Barek
    Participant

    Hello @ all,

    I hope somebody can help me out with following Situation:

    I need to configure OpenIG to redirect request by parsing data in JSON Format as follows:
    I want to achiev that OpenIG reads the “CostumerID” from JSON-Body and route the it to different protected applications (according to the CostumerID).

    Request which Comes in:

    
    curl \
     --header "Content-Type: application/json" \
     --request POST \
     --data '[
        {
          "CustomerID":"12345",
          "employeeID":"jdoe",
          "ReferenceAdmin":"Admin",
          "ReferenceAdminPassword":"Passw0rd",
          "sourceSystem":"HR"
          }
     ]' \
    "https://openig.example.com/lockuser"
    

    I could not find a special Filter which can read an Attribute from a JSON Body in the request.

    Thanks in Advanced

    #13917

    You could use a groovy ScriptableFilter that would access the request’s JSON entity and change the request.uri accordingly before forwarding it to the next handler.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?