I'm using CGI::Application::Plugin::Authentication.

I've written a logout form as follows:

sub logout_button { my $self = shift; my $q = $self->query(); my $output = ""; $output .= $q->start_form( -name => 'logout' ); $output .= $q->hidden(-name => 'authen_logout', -value => '1'); $output .= $q->submit(-value => 'logout'); $output .= $q->end_form(); return $output; }
I then call this, from a runmode as:
$output .= $self->logout_button();
Viewing source from a browser includes:
<form method="post" action="/auth-test/dprnew2.cgi" enctype="multipart +/form-data" name="logout"> <input type="hidden" name="authen_logout" value="1" /> <input type="submit" name=".submit" value="logout" /> </form>
But when I try to logout now, expecting to see a new login form, I get instead, the following in the browser:
Forbidden You don't have permission to access / on this server. Apache/1.3.33 Ben-SSL/1.55 Server at 192.168.0.101 Port 443
I'm also using CGI::Application::Plugin::Authorization. And suspect that may be to blame. But why would I be forbidden from seeing a login form when I've logged out?

-- Hugh


In reply to $self->authen->logout(); by hesco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.