Forum Discussion
Erich_Rockman_1
Dec 10, 2015Cirrus
Check Authorization / WWW-Authenticate headers
Hi. I am trying to make sure that the user what is trying to/has authenticated to a site w/ Basic Auth matches a user in a list. However, I cannot force the server to prompt if the user/pass is not a...
Stanislas_Piro2
Dec 11, 2015Cumulonimbus
Erich,
Do you want to block if the user provide a wrong password and is prompted again by the server?
when HTTP_REQUEST {
if {[catch {set username [HTTP::username] }]} { set username ""}
if { $username ne ""} {
set user_provided 1
} else {
set user_provided 0
}
}
when HTTP_RESPONSE {
if { ([HTTP::status] eq "401") && ($user_provided) } { HTTP::respond 403 content "Access is Denied!" }
}
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