Am 21.02.2007, 23:28 Uhr, schrieb Cees Hek <ceeshek@xxxxxxxxx>:
On 2/19/07, Alexander Becker <AlexanderBecker@xxxxxxx> wrote:
I tried to subclass one of my apps and use the CAP::Authentication in
one
of the subclasses.
That doesn't work. Each time i try to authenticate for one of the
subclass
runmodes, i don't get in.
The authentication don't seem fail, as no error message appears (as it
does if you enter invalid usn/pwd).
The form simply pops up again. The subclass authenticates as usual.
Can you clarify the problem a little bit more? You mention that the
subclass is having problems, but then finish with 'The subclass
authenticates as usual'? Which one is having the problem?
Oh, that was a mistake, sorry.
The *super*class authenticates as usual (everything is alright). If you
call the script the first time (what means that you will call the
superclass), you will get to a page where you can access a link to a
runmode of the superclass, which is protected and which will need
authentication.
If you try to access this runmode, the loginform displays and you have to
authenticate. THAT works. After the authentication, you will recieve the
page displayed by the runmode of the superclass which was protected.
There is also a link to the subclass. From there, you can reach a proteced
runmode of the subclass, which also needs authentication. THAT works NOT.
If you then try to access this runmode, the loginform is displayed (as it
should be).
You can enter data and submit the form.
If you enter a valid username and password, you will retrieve the
loginform again, instead of the returnvalue of the runmode (of the
subclass).
If you enter a username|password which is not valid, the loginform with an
error-message is will display.
package My::MyAppSuperclass::MyAppSubclass;
use strict;
use warnings;
use base qw/CGI::Application/;
Shouldn't the subclass inherit from your super class?
ie use base qw/My::MyAppSuperclass/;
Ups, another typo. I'm sorry.
The correction didn't change anything.
I don't think that alone will fix your problem, but I'd need you to
clarify these things before I can figure out what is going wrong here.
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
Maybe you want to try the script, as it is an example which can be run
directly if you have the the modules CGI::Application,
CGI::Application::Dispatch and CGI::Application::Plugin::Authentication.
HTH, A. Becker
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|