Forum Discussion
Yozzer
Nimbostratus
Feb 25, 2015Username 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 ...
Brad_Parker
Cirrus
Feb 25, 2015If 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]"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects