[twill] Twill and HTTP basic authentication?

Titus Brown titus at caltech.edu
Mon Oct 17 08:54:46 PDT 2005

-> Hello,
-> I've been looking into twill and it looks like  good way to write
-> small test scripts for a web site. However, I don't quite understand
-> how add_auth is supposed to work :-( I checked the documentation and
-> got lost with the code, so do you have any examples on how to use
-> twill with 401 result code cases?

Hi, Jussi,

ok, I'll put something more in the docs ;).  Basically,

	add_auth DzurAdmin http://dzur.idyll.org/ username passwd

lets twill know that any URL *under* http://dzur.idyll.org/ that is
protected by HTTP Basic Authentication in the realm DzurAdmin should
be accessed with username/password.

The corresponding Apache configuration (under '/admin') is

AuthUserFile htpasswd-file
AuthGroupFile /dev/null
AuthName DzurAdmin
AuthType Basic

<Limit GET>
require user username

I hope that helps...


More information about the twill mailing list