[cgiapp] CAP::Authentication

fREW Schmidt frioux at gmail.com
Mon Mar 16 12:14:12 EDT 2009


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


More information about the cgiapp mailing list