• 2 replies
  • Latest Post - ‏2013-02-08T00:33:14Z by SystemAdmin
2327 Posts

Pinned topic Handling cookies in HTTP Adapters

‏2013-01-29T15:12:11Z |

I have a HTTP Adapter which calls a custom Access Manger that returns authorization as cookies in the response header.
However in my worklight adapter I can access only one cookie using response.responseHeaders.
How to get the other cookies in the response headers?

Also I notice any further request from the same HTTP Adapters carries the cookies back to the server.
But another HTTP Adapter secured by the same Security Test doesn't send the same cookies back. It's worklight keeps the HTTP adapters in different sessions.
How can I make the adapters share the same session and thus the same cookies?

  • SystemAdmin
    2327 Posts

    Re: Handling cookies in HTTP Adapters

    Hi Rajaneesha,

    I am not sure if you are trying to receive multiple cookies with the same name, or otherwise ?

    If you're Trying to retrieve this set of cookies:
    HEADER1: 123123
    HEADER2: asdasd
    HEADER2: zxczxc

    It will generate
    HEADER1: 123123,
    HEADER2: "zxczxc"

    If you are trying to get several cookies with different names, this should work if you will:
    1. Add to the procedure connectAs="endUser"
    2. Protecting the procedure with a customTest containing only 1 realm - wl_annoymousUserRealm

    Jay Mehta
  • SystemAdmin
    2327 Posts

    Re: Handling cookies in HTTP Adapters

    Note: IBM forums are in the process of migrating to a new format. During migration the forums will be frozen and in read-only mode. If you wish to continue this thread discussion please post it on stackoverflow, where the Worklight team and others can respond.

    See the Forum Migration announce post for more details. Thank you.

    Barbara Hampson, Manager, IBM Worklight