Forum Discussion
praque_135655
Nimbostratus
Oct 18, 2013Getting HTTPID AND PASSWORD using irule
hi,
Following the is the requirement, i need to get userid and password from F5 incoming request and post it to siteminder application url.
UseCase:
1. In coming request at F5 has id/pwd in HTTP ...
praque_135655
Nimbostratus
Oct 18, 2013Hi,
I have corrected the script. please find the updated script
when CLIENT_ACCEPTED { set retries 0 set request_headers "" }
when HTTP_REQUEST {
if {$retried == 0}{
if {[HTTP::method] eq "GET" or "POST"}{
log local0. "Username = [HTTP::username] password = [HTTP::password]"
set request_headers [HTTP::request]
log local0. "HTTP request: $request_headers"
}
else{
set request_headers ""
}
} if{[HTTP::uri] contains "/OAuthDemo/test.html" }{ HTTP::retry "http://usclspcit192.airservices.eds.com/OAuthDemo/test.html" }
}
}
when HTTP_RESPONSE { Check if we got a 404
if { [HTTP::status] == 404 && $request_headers ne "" } {
Track that we are retrying this request
set retried 1
log local0. "404 error caught from pool. Retrying."
HTTP::retry $request_headers
} else { Track that we are retrying this request set retried 0 } }
Please review the script and let me know your comments
Regards, Praque
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