Forum Discussion
Retrieve Cookie from Post Response
Hi All,
I'm trying to 'shim' an authentication request to an app, and do a bit of MFA magic with it before returning the cookie to the client. Essentially we grab the User and Pass from the initial post request, and forward the user to our MFA service. I'd like to be able to grab the 'set-cookie' header from the post response from the back-end server (and store it encrypted in a table until the user completes their MFA).
MFA part works great, and I can send back a hard-coded cookie to the client, just stuck on how to grab the response from the server, any help would be great, please.
- Andy_McGrath
Cumulonimbus
The HTTP::cookie command can be used in the HTTP request and response event. In HTTP_RESPONSE it is reading the Set-Cookie header so if you know the cookie name can just use HTTP::cookie value, for example:
when HTTP_RESPONSE { set cookieValue [HTTP::cookie value MFACookie] TODO: Encrypt $cookieValue and save to table }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com