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

Pinned topic Handling cookies in HTTP Adapters

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

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?

Thanks,
Rajaneesha
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: Handling cookies in HTTP Adapters

    ‏2013-01-30T20:43:41Z  in response to SystemAdmin
    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

    Thanks,
    Jay Mehta
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: Handling cookies in HTTP Adapters

    ‏2013-02-08T00:33:14Z  in response to SystemAdmin
    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