Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

How to do pass-through login?

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


gunnarstrand at yahoo

Jul 9, 2009, 2:03 AM

Post #1 of 14 (1930 views)
Permalink
How to do pass-through login?

Hi,

I am looking for a way to send users to the login screen if they are
trying to access a restricted path, and if the login is valid, the
original request should just continue like this:

1. myapp <- GET /member/only
2. myapp -> /login_form
3. myapp <- POST /login
4. myapp -> /member/only

I guess this is what is called "pass-through login (and other actions)"
in the Cookbook, but I can't understand the description:

"Provide actions for these, but when they're required for something else
fill e.g. a form variable __login and have a sub begin like so:"

sub begin : Private {
my ($self, $c) = @_;
foreach my $action (qw/login docommand foo bar whatever/) {
if ($c->req->params->{"__${action}"}) {
$c->forward($action);
}
}
}


Where is the data from the original request stored? Is everything stored
in the "__$action" key including any values in a form submission?

An example on how pass-through works would be very helpful.

I would have expected something like this (pseudo-code):

In "begin" for /member/only:
unless ( $c -> user_exists() ) {
$c -> delay_action(); # Saves state in Flash or Session
$c -> forward('/login_form');
}

In "login" after authentication:
if ( $c -> restore_action() ) {
$c -> continue_action();
}

KR,
Gunnar








_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


zzbbyy at gmail

Jul 9, 2009, 2:49 AM

Post #2 of 14 (1881 views)
Permalink
Re: How to do pass-through login? [In reply to]

On Thu, Jul 9, 2009 at 11:03 AM, Gunnar Strand<gunnarstrand [at] yahoo> wrote:
>
> Hi,
>
> I am looking for a way to send users to the login screen if they are
> trying to access a restricted path, and if the login is valid, the
> original request should just continue like this:
>
> 1. myapp <- GET /member/only
> 2. myapp -> /login_form
> 3. myapp <- POST /login
> 4. myapp -> /member/only
>
> I guess this is what is called "pass-through login (and other actions)"
> in the Cookbook, but I can't understand the description:
>
> "Provide actions for these, but when they're required for something else
> fill e.g. a form variable __login and have a sub begin like so:"
>
>    sub begin : Private {
>      my ($self, $c) = @_;
>      foreach my $action (qw/login docommand foo bar whatever/) {
>        if ($c->req->params->{"__${action}"}) {
>          $c->forward($action);
>        }
>      }
>    }
>
>
> Where is the data from the original request stored? Is everything stored
> in the "__$action" key including any values in a form submission?
>
> An example on how pass-through works would be very helpful.
>
> I would have expected something like this (pseudo-code):
>
> In "begin" for /member/only:
> unless ( $c -> user_exists() ) {
>  $c -> delay_action();       # Saves state in Flash or Session
>  $c -> forward('/login_form');
> }
>
> In "login" after authentication:
> if ( $c -> restore_action() ) {
>  $c -> continue_action();
> }

There is Catalyst::Helper::Auth that generates such a passthrough
login component, but it is rather buggy. You can have a look at mine
ProtoWiki code at:
http://github.com/zby/CatalystX--ProtoWiki/blob/237284a35f5fd65e3d32cb5f88b81c28a47250e9/lib/CatalystX/ProtoWiki/Controller/Auth.pm
- it is copied from the code generated by Catalyst::Helper::Auth - and
then a bit modified/fixed, but it still needs a lot of work. It
redirects to an 'url' not action - so in theory it should retain
parameters etc. - but I am not sure if they are correctly encoded now.


--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


zzbbyy at gmail

Jul 9, 2009, 3:08 AM

Post #3 of 14 (1882 views)
Permalink
Re: How to do pass-through login? [In reply to]

On Thu, Jul 9, 2009 at 11:49 AM, Zbigniew Lukasiak<zzbbyy [at] gmail> wrote:
> On Thu, Jul 9, 2009 at 11:03 AM, Gunnar Strand<gunnarstrand [at] yahoo> wrote:
>>
>> Hi,
>>
>> I am looking for a way to send users to the login screen if they are
>> trying to access a restricted path, and if the login is valid, the
>> original request should just continue like this:
>>
>> 1. myapp <- GET /member/only
>> 2. myapp -> /login_form
>> 3. myapp <- POST /login
>> 4. myapp -> /member/only
>>
>> I guess this is what is called "pass-through login (and other actions)"
>> in the Cookbook, but I can't understand the description:
>>
>> "Provide actions for these, but when they're required for something else
>> fill e.g. a form variable __login and have a sub begin like so:"
>>
>>    sub begin : Private {
>>      my ($self, $c) = @_;
>>      foreach my $action (qw/login docommand foo bar whatever/) {
>>        if ($c->req->params->{"__${action}"}) {
>>          $c->forward($action);
>>        }
>>      }
>>    }
>>
>>
>> Where is the data from the original request stored? Is everything stored
>> in the "__$action" key including any values in a form submission?
>>
>> An example on how pass-through works would be very helpful.
>>
>> I would have expected something like this (pseudo-code):
>>
>> In "begin" for /member/only:
>> unless ( $c -> user_exists() ) {
>>  $c -> delay_action();       # Saves state in Flash or Session
>>  $c -> forward('/login_form');
>> }
>>
>> In "login" after authentication:
>> if ( $c -> restore_action() ) {
>>  $c -> continue_action();
>> }
>
> There is Catalyst::Helper::Auth that generates such a passthrough
> login component, but it is rather buggy.  You can have a look at mine
> ProtoWiki code at:
> http://github.com/zby/CatalystX--ProtoWiki/blob/237284a35f5fd65e3d32cb5f88b81c28a47250e9/lib/CatalystX/ProtoWiki/Controller/Auth.pm
> - it is copied from the code generated by Catalyst::Helper::Auth - and
> then a bit modified/fixed, but it still needs a lot of work. It
> redirects to an 'url' not action - so in theory it should retain
> parameters etc. - but I am not sure if they are correctly encoded now.
>

And by the way I think that a no-redirect login is more elegant
solution. It can be done by intercepting the dispatching in auto and
checking there if the user is authenticated and if no then also
checking if there are credential parameters in the request.

Cheers,
Zbigniew

>
> --
> Zbigniew Lukasiak
> http://brudnopis.blogspot.com/
> http://perlalchemy.blogspot.com/
>



--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


ogmoid at gmail

Jul 9, 2009, 7:57 AM

Post #4 of 14 (1875 views)
Permalink
Re: How to do pass-through login? [In reply to]

On Thu, Jul 9, 2009 at 5:03 AM, Gunnar Strand<gunnarstrand [at] yahoo> wrote:
>
> Hi,
>
> I am looking for a way to send users to the login screen if they are
> trying to access a restricted path, and if the login is valid, the
> original request should just continue like this:

A [rather long while ago] I rolled my own using the flash.
This happens to be the only way I use the flash in this app.

package MA:C:Root;

sub auto : Private {
my ($self, $c ) = @_;

# Exit early if going to a public path
return 1 if( grep { $c->action->reverse eq $_; } qw/login index/ );

if ( ! $c->user_exists ) {
# Save a submission the user tried to do in the flash.
# The {uri} will be redirected to after login.
# The {params} will be mapped in during that request.
if ( scalar keys % {$c->request->params} ) {
$c->flash->{params} = $c->request->params;
}
$c->flash->{uri} = $c->request->uri;
$c->response->redirect('/login');
return 0; # stop processing
}

# Restore saved params
if ( defined $c->flash->{params} and not scalar % {$c->request->params} ) {
# A submission was saved after the user logged out or (more
likely) expired.
# Populate the params with the saved values.
$c->request->params( $c->flash->{params} );
}

return 1; #continue processing
}

sub login : Local {
# Handle Auth ...
# ...

# Where to go now?
if ( scalar keys % { $c->flash } ) {
# The user has a saved action in the ->flash.
# Redirect there instead and maintain any {params}
# so they can be loaded next time.
$c->response->redirect($c->flash->{uri});
$c->keep_flash(qw/params/);
} else {
$c->response->redirect('/');
}
}

###

[kind?] Comments on it's ugliness/fitness would be appreciated.
$work is such that I rarely get time to revisit code after it "works"
and I did this possibly 2 years go :|

HTH,
--
Nate Nuss

>
> 1. myapp <- GET /member/only
> 2. myapp -> /login_form
> 3. myapp <- POST /login
> 4. myapp -> /member/only
>
> I guess this is what is called "pass-through login (and other actions)"
> in the Cookbook, but I can't understand the description:
>
> "Provide actions for these, but when they're required for something else
> fill e.g. a form variable __login and have a sub begin like so:"
>
>    sub begin : Private {
>      my ($self, $c) = @_;
>      foreach my $action (qw/login docommand foo bar whatever/) {
>        if ($c->req->params->{"__${action}"}) {
>          $c->forward($action);
>        }
>      }
>    }
>
>
> Where is the data from the original request stored? Is everything stored
> in the "__$action" key including any values in a form submission?
>
> An example on how pass-through works would be very helpful.
>
> I would have expected something like this (pseudo-code):
>
> In "begin" for /member/only:
> unless ( $c -> user_exists() ) {
>  $c -> delay_action();       # Saves state in Flash or Session
>  $c -> forward('/login_form');
> }
>
> In "login" after authentication:
> if ( $c -> restore_action() ) {
>  $c -> continue_action();
> }
>
> KR,
> Gunnar
>
>
>
>
>
>
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


jshirley at gmail

Jul 9, 2009, 8:14 AM

Post #5 of 14 (1869 views)
Permalink
Re: How to do pass-through login? [In reply to]

On Thu, Jul 9, 2009 at 7:57 AM, Nate <ogmoid [at] gmail> wrote:

> On Thu, Jul 9, 2009 at 5:03 AM, Gunnar Strand<gunnarstrand [at] yahoo>
> wrote:
> >
> > Hi,
> >
> > I am looking for a way to send users to the login screen if they are
> > trying to access a restricted path, and if the login is valid, the
> > original request should just continue like this:
>
> A [rather long while ago] I rolled my own using the flash.
> This happens to be the only way I use the flash in this app.
>
> package MA:C:Root;
>
> sub auto : Private {
> my ($self, $c ) = @_;
>
> # Exit early if going to a public path
> return 1 if( grep { $c->action->reverse eq $_; } qw/login index/ );
>
> if ( ! $c->user_exists ) {
> # Save a submission the user tried to do in the flash.
> # The {uri} will be redirected to after login.
> # The {params} will be mapped in during that request.
> if ( scalar keys % {$c->request->params} ) {
> $c->flash->{params} = $c->request->params;
> }
> $c->flash->{uri} = $c->request->uri;
> $c->response->redirect('/login');
> return 0; # stop processing
> }
>
> # Restore saved params
> if ( defined $c->flash->{params} and not scalar % {$c->request->params}
> ) {
> # A submission was saved after the user logged out or (more
> likely) expired.
> # Populate the params with the saved values.
> $c->request->params( $c->flash->{params} );
> }
>
> return 1; #continue processing
> }
>
> sub login : Local {
> # Handle Auth ...
> # ...
>
> # Where to go now?
> if ( scalar keys % { $c->flash } ) {
> # The user has a saved action in the ->flash.
> # Redirect there instead and maintain any {params}
> # so they can be loaded next time.
> $c->response->redirect($c->flash->{uri});
> $c->keep_flash(qw/params/);
> } else {
> $c->response->redirect('/');
> }
> }
>
> ###
>
> [kind?] Comments on it's ugliness/fitness would be appreciated.
> $work is such that I rarely get time to revisit code after it "works"
> and I did this possibly 2 years go :|
>
>
My method uses form parameters, so I can manually craft URLs. Then in the
login controller if someone is logged in, it just continues to the redirect.

Another point is to be careful as to what destinations you allow, you don't
want to redirect to just any old URI (especially important if you using form
parameters).

-J


gunnarstrand at yahoo

Jul 10, 2009, 1:09 PM

Post #6 of 14 (1856 views)
Permalink
Re: How to do pass-through login? [In reply to]

Thanks to all who answered my post regarding pass-through login! It put
me on the right track and it works like a charm now.

In my solution I have an action, Catalyst::Action::Restricted, which I
put on the subroutines which require a logged-in user
(:ActionClass('Restricted')). If no user is logged in, then the request
state is saved and the user forwarded to the login page.

I think it would be helpful to the next guy to improve the Cookbook with
a more elaborate example on how to implement this. The current paragraph
is a little thin, IMHO.

KR,
Gunnar








_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


larryl at emailplus

Jul 10, 2009, 1:38 PM

Post #7 of 14 (1847 views)
Permalink
Re: How to do pass-through login? [In reply to]

Hi Gunnar -

> Thanks to all who answered my post regarding pass-through login! It put
> me on the right track and it works like a charm now.
>
> In my solution I have an action, Catalyst::Action::Restricted, which I
> put on the subroutines which require a logged-in user
> (:ActionClass('Restricted')). If no user is logged in, then the request
> state is saved and the user forwarded to the login page.
>
> I think it would be helpful to the next guy to improve the Cookbook with
> a more elaborate example on how to implement this. The current paragraph
> is a little thin, IMHO.

I'd be interested to see what you finally came up with. Maybe you could
post to:

http://dev.catalyst.perl.org/wiki/wikicookbook

?


Thanks!
Larry

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


stephan at stejau

Jul 10, 2009, 2:07 PM

Post #8 of 14 (1856 views)
Permalink
Re: How to do pass-through login? [In reply to]

Hi,
i got a similar problem some time ago then Tomas 't0m' Doran pointed me
someway on irc.
If you wish i could post it.

It relays on a technique where you flash the url where you want to post
to and then it will be placed in a session
with an key(it changes from each form submission to prevent refresh
attacks on the site).

Larry Leszczynski schrieb:
> Hi Gunnar -
>
>
>> Thanks to all who answered my post regarding pass-through login! It put
>> me on the right track and it works like a charm now.
>>
>> In my solution I have an action, Catalyst::Action::Restricted, which I
>> put on the subroutines which require a logged-in user
>> (:ActionClass('Restricted')). If no user is logged in, then the request
>> state is saved and the user forwarded to the login page.
>>
>> I think it would be helpful to the next guy to improve the Cookbook with
>> a more elaborate example on how to implement this. The current paragraph
>> is a little thin, IMHO.
>>
>
> I'd be interested to see what you finally came up with. Maybe you could
> post to:
>
> http://dev.catalyst.perl.org/wiki/wikicookbook
>
> ?
>
>
> Thanks!
> Larry
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
Attachments: stephan.vcf (0.11 KB)


gunnarstrand at yahoo

Jul 10, 2009, 2:33 PM

Post #9 of 14 (1853 views)
Permalink
Re: How to do pass-through login? [In reply to]

Larry Leszczynski skrev:
> Hi Gunnar -
>
>
>> Thanks to all who answered my post regarding pass-through login! It put
>> me on the right track and it works like a charm now.
>>
>> In my solution I have an action, Catalyst::Action::Restricted, which I
>> put on the subroutines which require a logged-in user
>> (:ActionClass('Restricted')). If no user is logged in, then the request
>> state is saved and the user forwarded to the login page.
>>
>> I think it would be helpful to the next guy to improve the Cookbook with
>> a more elaborate example on how to implement this. The current paragraph
>> is a little thin, IMHO.
>>
>
> I'd be interested to see what you finally came up with. Maybe you could
> post to:
>
> http://dev.catalyst.perl.org/wiki/wikicookbook
>
> ?
>
Sure! I just need to iron out a few wrinkles concerning parameter
handling. I'll submit an article when it's done.

Thanks for the link, I wasn't aware of the wiki.

KR,
Gunnar









_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


mdietrich at cpan

Jul 10, 2009, 2:47 PM

Post #10 of 14 (1853 views)
Permalink
Re: How to do pass-through login? [In reply to]

Hi,

Am 10.07.2009 um 23:07 schrieb Stephan Jauernick:

> i got a similar problem some time ago then Tomas 't0m' Doran
> pointed me someway on irc.
> If you wish i could post it.

why not? I would be interested in different solutions.

matt

--
rainboxx Matthias Dietrich
Freier Software Engineer

rainboxx | Tel.: +49 (0) 151 / 50 60 78 64
Tölzer Str. 19 | Mail: matt [at] rainboxx
70372 Stuttgart | WWW : http://www.rainboxx.de

XING: https://www.xing.com/profile/Matthias_Dietrich18
GULP: http://www.gulp.de/profil/rainboxx.html
Attachments: PGP.sig (0.19 KB)


bobtfish at bobtfish

Jul 11, 2009, 4:43 PM

Post #11 of 14 (1833 views)
Permalink
Re: How to do pass-through login? [In reply to]

On 10 Jul 2009, at 21:09, Gunnar Strand wrote:

>
> Thanks to all who answered my post regarding pass-through login! It
> put
> me on the right track and it works like a charm now.
>
> In my solution I have an action, Catalyst::Action::Restricted, which I
> put on the subroutines which require a logged-in user
> (:ActionClass('Restricted')). If no user is logged in, then the
> request
> state is saved and the user forwarded to the login page.
>
> I think it would be helpful to the next guy to improve the Cookbook
> with
> a more elaborate example on how to implement this. The current
> paragraph
> is a little thin, IMHO.


Don't write how to implement it in the cookbook, implement the
generic version and put it on CPAN.. Except, that actually already
happened (Catalyst::Action::Role::ACL)

However - this is a bit silly, it's better implemented as an action
role.. (ala Catalyst::Controller::ActionRole) in my opinion,
otherwise it won't play nicely with things such as
Catalyst::Action::REST.

Having spoken to the the author of the above mentioned module, I've
gone ahead and converted it to an ActionRole:

http://github.com/bobtfish/catalyst-actionrole-acl/tree/master

This will hopefully be seen on a CPAN near you soon, patches are
obviously welcome if it wasn't quite what you were thinking of.. ;)

Cheers
t0m



_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Jul 11, 2009, 4:44 PM

Post #12 of 14 (1825 views)
Permalink
Re: How to do pass-through login? [In reply to]

On 10 Jul 2009, at 22:07, Stephan Jauernick wrote:

> Hi,
> i got a similar problem some time ago then Tomas 't0m' Doran
> pointed me someway on irc.
> If you wish i could post it.
>
> It relays on a technique where you flash the url where you want to
> post to and then it will be placed in a session
> with an key(it changes from each form submission to prevent refresh
> attacks on the site).


Yes, please write up if it made sense to you and you've actually used
it in anger..

It'd be even better if you CPAN'd it as a component which implemented
it generically. :_)

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


gunnarstrand at yahoo

Jul 12, 2009, 12:49 AM

Post #13 of 14 (1828 views)
Permalink
Re: How to do pass-through login? [In reply to]

Tomas Doran skrev:
>
> On 10 Jul 2009, at 21:09, Gunnar Strand wrote:
>
>>
>> Thanks to all who answered my post regarding pass-through login! It put
>> me on the right track and it works like a charm now.
>>
>> In my solution I have an action, Catalyst::Action::Restricted, which I
>> put on the subroutines which require a logged-in user
>> (:ActionClass('Restricted')). If no user is logged in, then the request
>> state is saved and the user forwarded to the login page.
>>
>> I think it would be helpful to the next guy to improve the Cookbook with
>> a more elaborate example on how to implement this. The current paragraph
>> is a little thin, IMHO.
>
>
> Don't write how to implement it in the cookbook, implement the generic
> version and put it on CPAN.. Except, that actually already happened
> (Catalyst::Action::Role::ACL)
>
> However - this is a bit silly, it's better implemented as an action
> role.. (ala Catalyst::Controller::ActionRole) in my opinion, otherwise
> it won't play nicely with things such as Catalyst::Action::REST.
>
> Having spoken to the the author of the above mentioned module, I've
> gone ahead and converted it to an ActionRole:
>
> http://github.com/bobtfish/catalyst-actionrole-acl/tree/master
>
> This will hopefully be seen on a CPAN near you soon, patches are
> obviously welcome if it wasn't quite what you were thinking of.. ;)
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. Or
have it permanently implemented on CPAN and then have the Cookbook
updated. 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).

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 () { ...} )?

KR,
Gunnar








_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Jul 12, 2009, 5:45 AM

Post #14 of 14 (1819 views)
Permalink
Re: How to do pass-through login? [In reply to]

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


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.