IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Get Body from request

    Posted 04/30/20 01:57 PM

    Hello Team

    Currently the customer is having a use-case where calling a policy id with content in body

    the problem is we can get the request Headers or parameter

    context.get(Scope.REQUEST, "urn:ibm:security:asf:request:header", "test");
    context.get(Scope.REQUEST, "urn:ibm:security:asf:request:parameter", "test");

    is there a way to get the request Body



    ------------------------------
    Mohamed El-Gendi
    ------------------------------


  • 2.  RE: Get Body from request

    Posted 05/01/20 12:02 PM
    Hi

    You may want to try
    var requestParameterMap = context.get(Scope.REQUEST, "internal:authsvc:request", "parametersMap");
    var testParameter = requestParameterMap.get("test");


    ------------------------------
    PRADEEP CHANDRASHEKHAR
    ------------------------------



  • 3.  RE: Get Body from request

    Posted 05/04/20 03:05 AM
    I depends on what you want to get from the body. I just struggled with the same question. I wanted to POST a JSON body with parameters to the service and as it turns out that is very easy. Just post to /sps/apiauthsvc and you can get the parameters the same way you would get them from a GET request: context.get(Scope.REQUEST, "urn:ibm:security:asf:request:parameter", "test").

    ------------------------------
    Laurent LA Asselborn
    ------------------------------