Forum Discussion
I need to use iRule to assign variables as my 2nd authentication device is not your typical POST external page. When I begin my LOOP again - I would hope/assume that my NEW userID or PasswordID would be assigned AGAIN as user may have missed it 1st time. I don't understand why this would be be design as 'not possible'.
I simply want to assign new values to my variable such as username and password on the 2nd time around user goes through the loop.
Basically - when I go back to Logon Page on Loop2 (followed by variable assignment by iRule) the NEW info added by user isn't updated. (same information from loop1 is used to sign in user).
IS there a way to force a change EACH time around in this scenario? I can change/update these variables through out the single loop, BUT not when it goes back to Login Page again.
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/gg" || [HTTP::uri] starts_with "/cgi/login" } { ACCESS::disable pool "pl_pool1_https"
if { [HTTP::uri] eq "/cgi/login" && [HTTP::method] eq "POST" } {
HTTP::collect [HTTP::header Content-Length]
} elseif { [HTTP::uri] eq "/gg/Start" && [HTTP::method] eq "POST" } {
HTTP::header replace "Referer" "https://deskit.domain.com/v/index.html"
}
}
}
when HTTP_REQUEST_DATA { set g_login "" set g_passwd "" set g_passwd1 "" set g_realm "" foreach field [split [HTTP::payload] "&"] { foreach {n v} [split $field "="] { switch $n { "login" { set g_login [URI::decode $v] } "passwd" { set g_passwd [URI::decode $v] } "passwd1" { set g_passwd1 [URI::decode $v] } "realm" { set g_realm [URI::decode $v] } } } } HTTP::release HTTP::redirect "/my.policy" }
when ACCESS_POLICY_AGENT_EVENT { ACCESS::session data set session.logon.last.username $g_login ACCESS::session data set -secure session.logon.last.password $g_passwd ACCESS::session data set -secure session.logon.last.nonce $g_passwd1
}
when ACCESS_ACL_ALLOWED { set type [ACCESS::session data get session.client.type] if { !($type starts_with "C") } { if { [HTTP::uri] == "/" } { ACCESS::respond 302 Location "https://[HTTP::host]/C/deskIT/site/default.aspx/" } } }