Forum Discussion
Username and session tracking in an irule
Hi
I want to track a user when they first login by capturing their username and the session cookie they are given in an irule. This is easy to achieve but i wanted to know how i can do this if the session cookie changes constantly. Any ideas of how i could do this would be appreciated.
Thanks
4 Replies
- Brad_Parker
Cirrus
If the application has a unique login page that gets posted to for login you could grab the username, possibly form the query parameter if that's where it is passed, and the session cookie value and stuff them into a different cookie value that you create with your iRule that should persist for the users entire session. Something like this may work.
when HTTP_REQUEST { if {[HTTP::uri] starts_with "/loginpage.aspx" && [HTTP::method] equals "POST"}{ HTTP::cookie insert BigIPsession "[URI::query [HTTP::uri] username]/[HTTP::cookie value aspsessionid]" } } - Yozzer
Nimbostratus
Thanks Brad
- Brad_Parker
Cirrus
Did you get something working the way you need it to?
- Yozzer
Nimbostratus
Yes thanks
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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