Gantry::Control::C::AuthenRegular - AuthenBase subclass for normal ORMs


Gantry documentation Contained in the Gantry distribution.

Index


Code Index:

NAME

Top

Gantry::Control::C::AuthenRegular - AuthenBase subclass for normal ORMs

SYNOPSIS

Top

use Gantry::Control::C::AuthenRegular qw/-Engine=MP20/;

DESCRIPTION

Top

This module allows authentication against a database.

METHOD

Top

user_model

Returns Gantry::Control::Model::auth_users. If you want something else, try Gantry::Control::C::AuthenCDBI or make your own Gantry::Control::C::AuthenBase subclass.

APACHE

Top

Sample Apache conf configuration

  <Location /location/to/auth >
    AuthType    Basic
    AuthName    "Manual"

    PerlSetVar  auth_dbconn     'dbi:Pg:<database_name>'
    PerlSetVar  auth_dbuser     '<database_user>'
    PerlSetVar  auth_dbpass     '<database_password>'

    PerlSetVar  auth_dbcommit   off

    PerlAuthenHandler   Gantry::Control::C::AuthenRegular

    require     valid-user
  </Location>

DATABASE

Top

This is the table that will be queried for the authentication of the user.

  create table "auth_users" (
    "id"            int4 default nextval('auth_users_seq') NOT NULL,
    "user_id"       int4,
    "active"        bool,
    "user_name"     varchar,
    "passwd"        varchar,
    "crypt"         varchar,
    "first_name"    varchar,
    "last_name"     varchar,
    "email"         varchar
  );

METHODS

Top

handler

The mod_perl authen handler.

SEE ALSO

Top

Gantry::Control::C::Authz(3), Gantry::Control(3), Gantry(3)

AUTHOR

Top

Phil Crow <philcrow2000@yahoo.com>

COPYRIGHT

Top


Gantry documentation Contained in the Gantry distribution.

package Gantry::Control::C::AuthenRegular;
use strict;

use base 'Gantry::Control::C::AuthenBase';

use Gantry::Control::Model::auth_users;

sub user_model {
    return 'Gantry::Control::Model::auth_users';
}

# EOF
1;

__END__