spacey has asked for the wisdom of the Perl Monks concerning the following question:

Hello all
Sorry to have to do this but I really need to ask a stupid question
I’m using the module Apache::AuthTicket and after following the example on the cpan site it works.
However the documentation is confusing me a little. This could be down to my misunderstanding or just my stupidity
I let you decide on that one.

I wish to change the login form to my own custom page.
Now I can see the documentation stipulates that you can overload subclasses. But to be honest I don’t understand this
im guess it means I can override the subroutine with my own? Possible with this next line?

In the example it talks about “void make_login_screen($r, String action, String destination)” this is were im starting to get confused
Is it simply the case of commenting out the make_login_screen in the original source and adding my own or can I feed some form of variable (like the one above) to apache/mod_perl to use another script/page to output the new login form?

If the later is correct were do I place such statement in apache or the original source.

As ever thanks in advance for any input you maybe able to give.
regards,
Gareth

Replies are listed 'Best First'.
Re: Apache::AuthTicket
by perrin (Chancellor) on Sep 02, 2004 at 21:18 UTC
    You need to make your own module which inherits from Apache::AuthTicket and override the make_login_screen method within it. Does that make sense to you?
      Hello perrin, Thank you for taking you time to reply, In theory it does but in practice well that’s another matter :(

      I know how to call my own module but im unsure in this
      scenario were I would be placing the call to my module,
      im presuming in the apache config? im I even close?

      I guess what i require is a more detailed example. Do you know of any books that cover this module or similar ones.

      Again thanks for your help. regards
      Gareth

        You would replace all calls to Apache::AuthTicket in your httpd.conf with calls to your module.

        <Location /foologinform> AuthType Apache::AuthTicket AuthName Foo SetHandler perl-script Perlhandler Your::Module->login_screen </Location>
        You can find lots of help with this and other things on the mailing list at the mod_perl site or in one of the books about mod_perl recommended there.