Andrew Payne wrote:
On Jan 23, 2008 2:30 PM, Ian Docherty <[EMAIL PROTECTED]> wrote:This might seem like a stupid question, and one that probably has a I could use Apache Basic Authentication, but I would prefer to hold usernames passwords in a database rather than a htpasswd file.Just do my ($username, $password) = $c->req->headers->authorization_basic; There's no need to have Apache handle it. I have an app with both an HTML and a REST/XML interface (under '/REST/'), and simply give the REST controller its own auto() sub, containing the above line. Works fine. Andrew
I went down an similar somewhat evil path for Mango.Since Mango has a custom Auth store/user anyways, I make my authenticate forward to authorization_basic when no options were passed:
## uses Auth/Store $c->authenticate({ username => $user, password => $pass }); ## uses HTTP Auth plugin $c->authenticate();
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/