Apache-Roaming

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


  Authenticate

      $ar_req->Authenticate();

    (Instance Method) This method is checking whether the user has
    authorized himself. The current implementation is checking only whether
    user name is given via $r->connection()->user(), in other words you can
    use simple basic authentication or something similar.

    The method should throw an exception in case of problems.

  CheckDir

      $ar_req->CheckDir();

    (Instance method) Once the user is authenticated, this method should
    determine whether the user is permitted to access the requested URI. The
    current implementation verifies whether the user is accessing a file in
    the directory $basedir/$user. If not, a Perl exception is thrown with
    $ar_req->{'status'} set to FORBIDDEN.

  GET, PUT, MOVE, DELETE

      $ar_req->GET();
      $ar_req->PUT();
      $ar_req->MOVE();
      $ar_req->DELETE();

    (Instance Methods) These methods are called finally for performing the

lib/Apache/Roaming.pm  view on Meta::CPAN


=head2 Authenticate

  $ar_req->Authenticate();

(Instance Method) This method is checking whether the user has authorized
himself. The current implementation is checking only whether user name
is given via $r->connection()->user(), in other words you can use simple
basic authentication or something similar.

The method should throw an exception in case of problems.

=cut

sub Authenticate {
    my $self = shift;
    my $r = $self->{'request'};

    # Check whether the user is authenticated.
    my $user = $self->{'user'};
    if (!$user) {

lib/Apache/Roaming.pm  view on Meta::CPAN

=pod

=head2 CheckDir

  $ar_req->CheckDir();

(Instance method) Once the user is authenticated, this method should
determine whether the user is permitted to access the requested URI.
The current implementation verifies whether the user is accessing
a file in the directory $basedir/$user. If not, a Perl exception is
thrown with $ar_req->{'status'} set to FORBIDDEN.

=cut

sub CheckDir {
    my $self = shift;
    my $file = $self->{'file'};
    my $basedir = $self->{'basedir'};
    my $dir = $file;
    my $user = $self->{'user'};
    my $prevdir;



( run in 0.248 second using v1.01-cache-2.11-cpan-496ff517765 )