Name

Bric::App::AccessHandler - Handles Authentication and Session setup during the Apache Access phase.

Synopsis

<Perl>
use lib '/usr/local/bricolage/lib';
</Perl>
PerlModule Bric::App::AccessHandler    <Location /media>
      SetHandler default-handler
  </Location>

PerlModule Bric::App::Handler
PerlFreshRestart    On
DocumentRoot "/usr/local/bricolage/comp"
<Directory "/usr/local/bricolage/comp">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    SetHandler perl-script
    PerlHandler Bric::App::Handler
    PerlAccessHandler Bric::App::AccessHandler
</Directory>

Description

This module handles the Access phase of an Apache request. It authenticates users to Bricolage, and sets up Session handling.

Interface

Constructors

NONE.

Destructors

NONE.

Public Class Methods

NONE.

Public Functions

my $status = handler($r)

Sets up the user session and checks authentication. If the authentication is current, it returns OK and the request continues. Otherwise, it caches the requested URI in the session and returns HTTP_FORBIDDEN.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

my $status = logout_handler($r)

Logs the user out.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

my $status = okay($r)

This handler should only be used for the '/login' location of the SSL virtual host. It simply sets up the user session and returns OK.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

my $status = handle_err($r, $err)

Handles errors for the other handlers in this class.

Throws: NONE.

Side Effects: NONE.

Notes: NONE.

Private

Private Class Methods

NONE.

Private Instance Methods

NONE.

Private Functions

NONE.

Notes

NONE.

Author

David Wheeler <david@justatheory.com>

See Also

Bric