[Catalyst] How to do pass-through login?

Tomas Doran bobtfish at bobtfish.net
Sun Jul 12 12:45:38 GMT 2009


On 12 Jul 2009, at 08:49, Gunnar Strand wrote:
> That's great!
>
> Still, I think the Manual::Cookbook page need clarification concerning
> pass-through login because it's not obvious how it's implemented.

Yes, I totally agree.

> Or
> have it permanently implemented on CPAN and then have the Cookbook
> updated.

Even better.

> It seems on the borderland of authenticate/authorization when a user
> only need to be authenticated to be authorized to do some actions.
> Authentication should probably offer similar support,
> Catalyst::ActionRole::Authenticated (eg. sub list_member :Local
> :RequireAuthenticatedUser () { ...} )?

Doing this is somewhere on my list if nobody else does first, but I  
kinda got sidetracked by this, and trying to build a more 'full  
solution' generic login controller people can reuse.. That'll see the  
light of github at some point, but just doing the authenticated  
actionrole as a seperate dist is fairly simple, and someone should  
volunteer :)

> I am not entirely sure where it should be put. Currently I've
> added a Myapp::State class which encapsulates save and restore of the
> request state, but it should perhaps either be part of Session (as a
> generic request state save/restore) or Request (as request->pause/ 
> resume
> or request->delay/continue or some such).

I'd probably make it (or at least the serialization of the request  
part) a request trait (see Catalyst::TraitFor::Request::ProxyBase for  
an example).

Cheers
t0m




More information about the Catalyst mailing list