Posted to tcl by colin at Thu Dec 22 22:20:44 GMT 2011view raw

  1. [
  2. # This file is evaluated after content is received but prior to conversion
  3. # this script file performs basic authentication
  4. lassign [Http Credentials $response] userid pass
  5. if {$userid ne "admin" || $pass ne "admin"} {
  6. set challenge "Please login user: 'admin' password: 'admin'"
  7. set content "You must login with user: 'admin' password: 'admin'"
  8. set response [Http Unauthorized $response [Http BasicAuth $challenge] $content x-text/html-fragment]
  9. }
  10. ### Local Variables: ***
  11. ### mode:tcl ***
  12. ### tcl-indent-level:4 ***
  13. ### tcl-continued-indent-level:4 ***
  14. ### indent-tabs-mode:nil ***
  15. ### End: ***
  16. ]