Oleg Pronin wrote:
Not really :-) While in request, browser header is ok, but the task is
to be able to authenticate in offline scripts as well - because the
controllers and etc read logged in user from $c->user.
Currently we use workaround - fake $c object + setup $c->request->header
for base authentication as it came from browser.
That's not _too much_ of a hack, given that you've got application logic
in your controllers anyway.
The recommended thing to do is to not have any application logic in your
controllers (just have web parameter mangling related stuff). If your
logic is all in the model, then your scripts can deal with
authenticating without having to fake up a web request, or in fact load
Catalyst at all, which is much nicer, and makes much more sense in a
script context..
Also, what do you mean by 'new Authentication',
Catalyst::Authentication::Credential::HTTP has _always_ worked like
this.
I'm not sure but last time i used this feature (several months ago) it
worked fine
Hmm, well, if you still think I've broken something, I'd love to see a
TestApp or test cases demonstrating what the problem is, as I'm still
unclear.. (And if I did break it, I'd obviously like to fix it again)
Cheers
t0m
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/