Hi!
We are trying to use CAP::Authentication and in general it works fairly
well. I am trying to make a new LOGIN_RUNMODE though and it just doesn't
seem to work.
Here's my code:
__PACKAGE__->authen->config(
DRIVER => [ 'Generic', { user1 => '123' } ],
LOGIN_RUNMODE => 'login',
);
__PACKAGE__->authen->protected_runmodes(qr/^(?!main)/);
sub login : Runmode {
my $self = shift;
$self->header_add( -status => '500 unauthenticated' );
return $self->json_body({ success => 'false', reason =>
'unauthenticated'});
}
Clearly I am not doing anything very special, but for some reason I am
getting a 404 error. I tried all of these:
LOGIN_RUNMODE => 'login',
LOGIN_RUNMODE => 'controller/login',
LOGIN_RUNMODE => '/controller/login',
LOGIN_RUNMODE => '/ACD/controller/login',
All with no luck. Does anyone have any idea what I am doing wrong?
Thanks!
--
fREW Schmidt
http://blog.afoolishmanifesto.com
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################