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

Mailing List Archive: Catalyst: Users

RFC: CatalystX::RedirectAfterLogin

 

 

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


devin.austin at gmail

Jul 13, 2009, 2:04 AM

Post #1 of 2 (718 views)
Permalink
RFC: CatalystX::RedirectAfterLogin

I'm quite positive others are working on something like this, but I'd like
this to serve as A) my volunteering to help with ongoing efforts and B) help
get a center point from which to start.

I'm working on a "pass through login" type Role for Catalyst (I think that's
what I should call it).

The idea looks like this:

package TestApp::Controller::Root;
use Moose;
use namespace::autoclean;
BEGIN { extends 'Catalyst::Controller'; }
with 'CatalystX::RedirectAfterLogin';

sub login : Local {
my ($self, $c) = @_;

if ( $c->req->param('username') eq 'blah' ) {
$c->next_page('success');
} else {
$c->res->body('Failed!');
$c->detach;
}

}


sub success : Path {
my ($self, $c) = @_;
$c->res->body("Success!");

}

This isn't quite working yet. I'm getting some errors with Moose that I
can't figure out. Feel free to poke:
CatalystX::RedirectAfterLogin<http://github.com/dhoss/CatalystX--RedirectAfterLogin/tree/master>

Original post:
http://www.codedright.net/2009/07/catalystxredirectafterlogin.html

--
Devin Austin
http://www.codedright.net
http://www.dreamhost.com/r.cgi?326568/hosting.html - Host with DreamHost!


bobtfish at bobtfish

Jul 14, 2009, 11:09 AM

Post #2 of 2 (626 views)
Permalink
Re: RFC: CatalystX::RedirectAfterLogin [In reply to]

Devin Austin wrote:
> I'm quite positive others are working on something like this, but I'd
> like this to serve as A) my volunteering to help with ongoing efforts
> and B) help get a center point from which to start.

http://github.com/bobtfish/catalystx-simplelogin/blob/73580ed8bd94b707ef5d5e26f8817fafbf9356d4/lib/CatalystX/SimpleLogin/ControllerRole/Login/WithRedirect.pm

There is also a TODO file in the top of the repository if anyone feels
like joining in.. ;)

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.