[Catalyst] forcing authentication without credentials

Nathan Kurz nate at verse.com
Thu Jul 27 21:48:08 CEST 2006


On Thu, Jul 27, 2006 at 12:18:04PM -0700, Rodney Broom wrote:
> From: "Nathan Kurz" <nate at verse.com>
> 
> >   my $user = $c->model('DB::User')->create({...});
> >   $c->login($user);
> > 
> > This doesn't work (for reasons that I understand)...
> 
>
> I'd be interested in why $c->login($user) doesn't work for
> you. That's what I'm doing:
> sub signup
> {
>   # ... $user = create...
> 
>   # Log in the newly created user
>   $c->login($user->login, $user->password);
> 
> }

Sorry if I was unclear.  Using the two arg form of $c->login works
fine, and I use that often.  The problem I'm having is forcing a login
for a newly created user that has neither an email address (my
user_field) nor a password.  I'd like a way to force authentication
without checking either of these, by directly promoting a user object
to be authenticated.  There are ways I could fake this (create and
delete temporary values) but these feel like silly workarounds.

Thanks!

--nate








More information about the Catalyst mailing list