Forum Discussion
jk20004_44080
Nimbostratus
Sep 03, 2015set/overide session values via iRule
we are using the Loop "function" in a APM policy to handle the Login page
in this loop we need to separate different possible login methods (email, loginname,….) which we do in a iRule.
We found...
Seth_Cooper
Employee
Sep 08, 2015Try this in a VPE variable assign before your iRule event and then remove the iRule event and use an empty VPE action...
session.custom.logontype =
set logonname [string trim [mcget {session.logon.last.username}]];
if { [string length $logonname] == 0 } {
return "99"
} else {
if { $logonname starts_with "company-" } {
return "1";
} elseif { $logonname ends_with ".com"} then {
return "2";
} elseif { $logonname contains "company.net"} {
if { $logonname contains "\\"} {
return "1";
} else {
return "3";
}
} else {
return "1";
}
}
Then in the action after the variable assign you can create a empty VPE action that checks the session.custom.logontype session variable value and proceeds down the branch needed.
Please let me know if this helps.
Seth
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