view release on metacpan or search on metacpan
At one level beneath SecSess (SecSess::Cookie.pm and SecSess::URL.pm),
are the methods for interpreting and manipulating credentials.
At the lowest level, are subclasses which "know" how to interpret the
*initial* identifying information during the issuance of credentials.
So, *::Cookie::LoginForm presents the client with a user/password
login form for identification. And thus the difference between
*::Cookie::URL and *::URL::Cookie is that the former will issue cookies
after validating an URL credential, and the latter will "issue" an URL
credential (typically it will redirect to a resource with realm=cred in
the URL) after validating a cookie.
are sorted lexicographically to determine which cookies to use. The
cleartext values are not trusted.)
The QOP parameters are separated to allow flexibility in the threat model.
In the simplest paradigm (and first demo examples), qop=0 and authqop=40,
which merely indicates that the user ID's and passwords are protected with
SSL but the web docs acquired with them are not. This is somewhat common
over intranets. Under the stronger threat model of an active adversary
who controls the untrusted network, true end-to-end security is
required, but we may still wish to separate session and authentication
qualities of protection. For example, if all SSL sessions never drop
below 128-bits, we may still choose to allow weaker strength during user
authentication, say with a 20-bit PIN or one-time password. Scientific
cryptography cannot always afford to distinguish between an attack which
costs 2^20 computations and one which succeeds with probability 1/2^20,
because with 1 million users, the two situations are identical. But, for
practical risk assessment, it may be perfectly acceptable to trade strong
session credentials for weak login credentials.
form 'realm:0,0=value', and a secure one of form 'realm:40,40=value'.
cookieDomain => {'0,40' => 'lysander.acme.com'}
will set a single non-secure cookie for the given host. This is a
common paradigm for protecting passwords over an intranet.
cookieDomain => {
0 => '.acme.com',
40 => '.acme.com', # weak wildcard domain
'64,128' => '.sec.acme.com', # stronger wildcard domain
dbo => Apache::SecSess::DBI->new(
dbifile => '/usr/local/apache/conf/private/dbilogin.txt'
),
UNFINISHED. Apache::SecSess was designed to abstractly handle user
information. All user ID, password, X.509 DN queries are handled through
an opaque object of class Apache::SecSess::DBI.
Since there is no documentation for this version, you must follow the
instructions in INSTALL to get it to work. Read db/* for more
info.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/Cassandra.pm view on Meta::CPAN
a_session text
);
=head1 CONFIGURATION
The module must know what datasource, username, and password to use when
connecting to the database. These values can be set using the options hash
(see Apache::Session documentation). The options are DataSource, UserName,
and Password.
Example:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Counted.pm view on Meta::CPAN
my $rhexid = sprintf "%08x", $c->inc;
my $hexid = scalar reverse $rhexid; # optimized for treestore. Not
# everything in one directory
# we have entropy as bad as rand(). Typically not very good.
my $password = sprintf "%08x%08x", rand(0xffffffff), rand(0xffffffff);
if (exists $self->{args}{HostID}) {
return sprintf "%s:%s_%s", $self->{args}{HostID}, $hexid, $password;
} else {
return $hexid . "_" . $password;
}
}
1;
lib/Apache/Session/Counted.pm view on Meta::CPAN
session ID in Apache::Session::Counted consists of two or three parts:
an optional host alias given by the HostID paramter, followed by a
colon. Then an ordinary number which is a simple counter which is
followed by an underscore. And finally a session-ID like the one in
Apache::Session. The number part is used as an identifier of the
session and the ID part is used as a password. The number part is
easily predictable, but the second part is reasonable unpredictable.
We use the first part for implementation details like storage on the
disk and the second part to verify the ownership of that token.
=head1 PREREQUISITES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
}
}
# Bind with credentials
my $bind = $ldap->bind( $self->{args}->{ldapBindDN},
password => $self->{args}->{ldapBindPassword} );
if ( $bind->code ) {
$self->logError($bind);
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/MariaDB.pm view on Meta::CPAN
my $datasource = $session->{args}->{DataSource}
|| $Apache::Session::Store::MariaDB::DataSource;
my $username = $session->{args}->{UserName}
|| $Apache::Session::Store::MariaDB::UserName;
my $password = $session->{args}->{Password}
|| $Apache::Session::Store::MariaDB::Password;
$self->{dbh} = DBI->connect( $datasource, $username, $password, { RaiseError => 1, AutoCommit => 1 } )
|| die $DBI::errstr;
#If we open the connection, we close the connection
$self->{disconnect} = 1;
lib/Apache/Session/Store/MariaDB.pm view on Meta::CPAN
If you use some other command, ensure that there is a unique index on the
table's id column.
=head1 CONFIGURATION
The module must know what datasource, username, and password to use when
connecting to the database. These values can be set using the options hash
(see Apache::Session documentation). The options are:
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/MongoDB.pm view on Meta::CPAN
my ( $self, $args ) = @_;
my $conn_args;
foreach my $w (
qw(host auth_mechanism auth_mechanism_properties bson_codec
connect_timeout_ms db_name heartbeat_frequency_ms j local_threshold_ms
max_time_ms password port read_pref_mode read_pref_tag_sets
replica_set_name server_selection_timeout_ms server_selection_try_once
socket_check_interval_ms socket_timeout_ms ssl username w wtimeout
read_concern_level)
)
{
lib/Apache/Session/MongoDB.pm view on Meta::CPAN
backing store and no locking.
=head1 PARAMETERS
You can set the followong parameters host, db_name, collection, auth_mechanism,
auth_mechanism_properties, connect_timeout_ms, ssl, username and password.
See L<MongoDB> for more
=head1 SEE ALSO
L<MongoDB>, L<Apache::Session>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/SQLite3.pm view on Meta::CPAN
return;
}
my $datasource = $session->{args}->{DataSource} || $DataSource;
my $username = $session->{args}->{UserName} || $UserName;
my $password = $session->{args}->{Password} || $Password;
$self->{dbh} = DBI->connect(
$datasource,
$username,
$password,
{ RaiseError => 1, AutoCommit => 1 }
) or die $DBI::errstr;
$self->{disconnect} = 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
user_name =>
{ type => UNDEF | SCALAR,
optional => 1,
descr => 'The user name to be used when connecting to a database' },
password =>
{ type => UNDEF | SCALAR,
default => undef,
descr => 'The password to be used when connecting to a database' },
table_name =>
{ type => UNDEF | SCALAR,
optional => 1,
descr => 'The table in which sessions are saved' },
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
lock_user_name =>
{ type => UNDEF | SCALAR,
optional => 1,
descr => 'The user name to be used when connecting to a database' },
lock_password =>
{ type => UNDEF | SCALAR,
default => undef,
descr => 'The password to be used when connecting to a database' },
handle =>
{ type => OBJECT,
optional => 1,
descr => 'An existing database handle to use' },
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
@ApacheSessionParams{ qw( Informix Oracle Sybase ) } =
( $ApacheSessionParams{Postgres} ) x 3;
my %OptionalApacheSessionParams =
( MySQL => [ [ qw( table_name password lock_password ) ] ],
Postgres => [ [ qw( table_name password ) ] ],
Informix => [ [ qw( table_name password ) ] ],
Oracle => [ [ qw( long_read_len table_name password ) ] ],
Sybase => [ [ qw( textsize table_name password ) ] ],
);
my %ApacheSessionFlexParams =
( store =>
{ MySQL => [ [ qw( data_source user_name ) ],
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
=item * user_name => user name
Corresponds to the C<UserName> parameter passed to the DBI-related
session modules.
=item * password => password
Corresponds to the C<Password> parameter passed to the DBI-related
session modules. Defaults to undef.
=item * handle => DBI handle
lib/Apache/Session/Wrapper.pm view on Meta::CPAN
=item * lock_user_name => user name
Corresponds to the C<LockUserName> parameter passed to
C<Apache::Session::MySQL>.
=item * lock_password => password
Corresponds to the C<LockPassword> parameter passed to
C<Apache::Session::MySQL>. Defaults to undef.
=item * lock_handle => DBI handle
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session.pm view on Meta::CPAN
if ($@) {
die "Global data is not accessible: $@";
}
my $dbh = DBI->connect($global_data{datasource},
$global_data{username}, $global_data{password}) || die $DBI::errstr;
undef %global_data;
#program continues...
lib/Apache/Session.pm view on Meta::CPAN
my %session;
tie %session, 'Apache::Session::MySQL', $cookie, {
DataSource => 'dbi:mysql:sessions', #these arguments are
UserName => 'mySQL_user', #required when using
Password => 'password', #MySQL.pm
LockDataSource => 'dbi:mysql:sessions',
LockUserName => 'mySQL_user',
LockPassword => 'password'
};
#Might be a new session, so lets give them their cookie back
my $session_cookie = "SESSION_ID=$session{_session_id};";
view all matches for this distribution
view release on metacpan or search on metacpan
SessionManager.pm view on Meta::CPAN
If you use MySQL for your datastore, you need to pass database connection
informations:
PerlSetVar SessionManagerStoreArgs "DataSource => dbi:mysql:sessions, \
UserName => user, \
Password => password"
Please see the documentation for store/lock modules in order to pass right
arguments.
=item C<SessionManagerItemExclude> string|regex
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SiteControl/Radius.pm view on Meta::CPAN
sub check_credentials
{
my $r = shift; # Apache request object
my $username = shift;
my $password = shift;
my $host = $r->dir_config("RadiusSiteControlHost") || "localhost";
my $secret = $r->dir_config("RadiusSiteControlSecret") || "unknown";
my $radius;
# Get my IP address to pass as the
lib/Apache/SiteControl/Radius.pm view on Meta::CPAN
$radius = new Authen::Radius(Host => $host, Secret => $secret);
if(!$radius) {
$r->log_error("Could not contact radius server!");
return 0;
}
if($radius->check_pwd($username, $password, $nas_ip_address)) {
return 1;
}
$r->log_error("User $username failed authentication:" . $radius->strerror);
return 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Sling.pm view on Meta::CPAN
my $authn;
my $help;
my $log;
my $man;
my $number_forks = 1;
my $password;
my $url;
my $user;
my $verbose;
my $sling = {
lib/Apache/Sling.pm view on Meta::CPAN
Auth => $auth,
Authn => $authn,
Help => $help,
Log => $log,
Man => $man,
Pass => $password,
Threads => $number_forks,
URL => $url,
User => $user,
Verbose => $verbose
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Solr/Tables.pm view on Meta::CPAN
hl.usePhraseHighlighter 1.3
literalsOverride 4.0
mlt.fl 1.3
pageDoc 4.0
pageScore 4.0
passwordsFile 4.0
qs 1.3
resourse.password 4.0
shards 3.1
shards.qt 3.1
spellcheck.accuracy 3.1
spellcheck.collate 3.1
spellcheck.maxCollations 3.1
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 SYNOPSIS
use Apache::Sybase::CTlib2;
Apache::Sybase::CTlib2->connect_on_init("user", "password", "server", "db");
=head1 DESCRIPTION
This module allows Apache/Modperl/Sybperl users to connect to sybase data servers, and maintain persistant connections. The advantage should be clear, as this avoids the overhead of creating a connection, gathering data, and then destroying the conne...
In /apache/startup.pl
use Apache::Sybase::CTlib2;
Apache::Sybase::CTlib2->connect_on_init("user", "password", "server", "db");
Passing db (database name) to the module will allow you to specify a database to start in (the module will execute "use database" after the connection is established). This is an optional parameter.
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TS/AdminClient.pm view on Meta::CPAN
The Apache Traffic Server Administration Manual will explain what these strings represent. (http://trafficserver.apache.org/docs/)
proxy.config.accept_threads
proxy.config.task_threads
proxy.config.admin.access_control_file
proxy.config.admin.admin_password
proxy.config.admin.admin_user
proxy.config.admin.advanced_ui
proxy.config.admin.autoconf.localhost_only
proxy.config.admin.autoconf.pac_filename
proxy.config.admin.autoconf_port
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TestBuild.pm view on Meta::CPAN
#XXX do something better than doesn't require prompt if
#we already have an entry in ~/.cvspass
#$self->cvs('login');
warning "may need to run the following command ",
"(password is 'anoncvs')";
warning "cvs -d $self->{cvsroot} login";
}
}
if (-d $dir) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/UploadSvr.pm view on Meta::CPAN
PerlSetVar Auth_DBI_data_source dbi:mSQL:authen
PerlSetVar Auth_DBI_pwd_table usertable
PerlSetVar Auth_DBI_grp_table grouptable
PerlSetVar Auth_DBI_uid_field user
PerlSetVar Auth_DBI_grp_field group
PerlSetVar Auth_DBI_pwd_field password
PerlSetVar stageuri /STAGE
PerlSetVar Apache_UploadSvr_Usermgr "Apache::UploadSvr::User"
PerlSetVar Apache_UploadSvr_myuri /perl/user/up
PerlSetVar Apache_UploadSvr_transdir /usr/local/apache/trans
PerlSetVar Apache_UploadSvr_trashdir /usr/local/apache/trash
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Voodoo/Application/ConfigParser.pm view on Meta::CPAN
$_->{'extra'}->{HandleError} = Exception::Class::DBI->handler;
[
$_->{'connect'},
$_->{'username'},
$_->{'password'},
$_->{'extra'}
]
} @{$db}
];
}
view all matches for this distribution
view release on metacpan or search on metacpan
MailPeek.pm view on Meta::CPAN
my @msgnos = ();
my %params = $r->method eq 'POST' ? $r->content : $r->args;
Mail::Cclient::set_callback
login => sub {
return $params{'username'}, $params{'password'}
},
searched => sub {
push (@msgnos, $_[1]);
},
log => sub { print @_ }, dlog => sub { print @_};
view all matches for this distribution
view release on metacpan or search on metacpan
conf/server.xml.PL view on Meta::CPAN
driverName="mysql"
connectionName="test"
connectionPassword="test"
connectionURL="database=test"
roleNameCol="rolename"
userCredCol="password"
userNameCol="username"
userRoleTable="user_roles"
userTable="users"/>
-->
view all matches for this distribution
view release on metacpan or search on metacpan
Wyrd/DBL.pm view on Meta::CPAN
=item database
database name (to connect to)
=item db_password
database password
=item db_username
database user name
Wyrd/DBL.pm view on Meta::CPAN
base_class
blksize
blocks
ctime
database
db_password
db_username
dba
dev
file_path
gid
Wyrd/DBL.pm view on Meta::CPAN
sub dbh {
my ($self) = shift;
my $dba = $self->{'dba'};
my $db = $self->{'database'};
my $uname = $self->{'db_username'};
my $pw = $self->{'db_password'};
my $dbh = $self->_init_db($dba, $db, $uname, $pw);
return $dbh if ($dbh);
$self->log_bug('dbh was requested from DBL but no database could be initialized');
return;
}
Wyrd/DBL.pm view on Meta::CPAN
=pod
=item (internal) C<_init_db> (scalar, scalar, scalar, scalar);
open the DB connection. Accepts a database type, a database name, a username,
and a password. Defaults to a mysql database. Sets the dbh parameter and the
dbh_ok parameter if the database connection was successful. Meant to be called
from C<dbh>. As of version 0.97 calls connect_cached instead of attempting to
maintain a cached connection itself.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/DBIBase64Store.pm view on Meta::CPAN
my $dbh = $session->{args}{dbh} || $self->{dbh};
unless ( $dbh ) {
my $dsn = $session->{args}{DataSource};
my $username = $session->{args}{UserName};
my $password = $session->{args}{Password};
die "No opened database connection and no DSN\n" unless $dsn;
$dbh = DBI->connect( $dsn, $username, $password, { AutoCommit => 0,
RaiseError => 1,
} );
# Save it for future use
$self->{dbh} = $dbh;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/API.pm view on Meta::CPAN
sub init
{
my $self = shift( @_ );
my $pwd = shift( @_ );
return( $self->error( "No password was provided." ) ) if( !defined( $pwd ) );
$self->{create} = 0 if( !exists( $self->{create} ) );
# md5 | bcrypt | sha256 | sha512
$self->{algo} = 'md5' if( !exists( $self->{algo} ) );
# 04..31
$self->{bcrypt_cost} = 12 if( !exists( $self->{bcrypt_cost} ) );
lib/Apache2/API.pm view on Meta::CPAN
$salt = substr( $salt, 0, 8 );
$self->_load_class( 'Digest::MD5' ) ||
return( $self->pass_error );
my $magic = '$apr1$';
# 1) initial ctx: password + magic + salt
my $ctx = Digest::MD5->new;
local $@;
# try-catch
eval
{
lib/Apache2/API.pm view on Meta::CPAN
if( $@ )
{
return( $self->error( "Error adding string to create MD5 hash: $@" ) );
}
# 2) alternate sum: md5(password + salt + password)
my $alt = Digest::MD5->new;
eval
{
$alt->add( $passwd, $salt, $passwd );
};
lib/Apache2/API.pm view on Meta::CPAN
{
return( $self->error( "Error adding string to create MD5 hash: $@" ) );
}
}
# 4) mix in bytes based on bits of password length
for( my $i = $plen; $i > 0; $i >>= 1 )
{
eval
{
if( $i & 1 )
lib/Apache2/API.pm view on Meta::CPAN
{
Crypt::Bcrypt::bcrypt_check( $pwd => $hash );
};
if( $@ )
{
return( $self->error( "Error checking if password matches using Crypt::Bcrypt: $@" ) );
}
return( $bool );
}
# Fallback 3: Crypt::Eksblowfish::Bcrypt (settings must have bcrypt-base64 salt)
elsif( $self->_load_class( 'Crypt::Eksblowfish::Bcrypt' ) )
lib/Apache2/API.pm view on Meta::CPAN
}
return( defined( $out ) && $out eq $hash );
}
elsif( $crypt_error )
{
return( $self->error( "Error checking bcrypt password: $crypt_error" ) );
}
}
return( defined( $out ) && $out eq $hash );
}
elsif( $hash =~ /\A$SHA_RE\z/ )
lib/Apache2/API.pm view on Meta::CPAN
{
Crypt::Passwd::XS::crypt( $pwd, $hash );
};
if( $@ )
{
return( $self->error( "Error checking the password using Crypt::Passwd::XS: $@" ) );
}
return( defined( $out ) && $out eq $hash );
}
elsif( $crypt_error )
{
return( $self->error( "Error checking SHA password: $crypt_error" ) );
}
return(0);
}
else
{
lib/Apache2/API.pm view on Meta::CPAN
my $server = $api->server;
my $version = $api->server_version;
$api->set_handlers( $name => $code_reference );
$api->warn( @some_warnings );
my $hash = apr1_md5( $clear_password );
my $hash = apr1_md5( $clear_password, $salt );
my $ht = $api->htpasswd( $clear_password );
my $ht = $api->htpasswd( $clear_password, salt => $salt );
my $hash = $ht->hash;
say "Does our password match ? ", $ht->matches( $user_clear_password ) ? "yes" : "not";
=head1 VERSION
v0.5.0
lib/Apache2/API.pm view on Meta::CPAN
Given a L<DateTime> object, this sets it to GMT time zone and set the proper formatter (L<Apache2::API::DateTime>) so that the stringification is compliant with HTTP headers standard.
=head2 htpasswd
my $ht = $api->htpasswd( $clear_password, create => 1 );
my $ht = $api->htpasswd( $clear_password, create => 1, salt => $salt );
my $ht = $api->htpasswd( $md5_password );
my $bool = $ht->matches( $user_input_password );
This instantiates a new L<Apache2::API::Password> object by providing its constructor whatever arguments was received.
It returns a new L<Apache2::API::Password> object, or, upon error, C<undef> in scalar context, or an empty list in list context.
lib/Apache2/API.pm view on Meta::CPAN
=head1 CLASS FUNCTIONS
=head2 apr1_md5
my $md5_password = apr1_md5( $clear_password );
my $md5_password = apr1_md5( $clear_password, $salt );
This class function is exported by default.
It takes a clear password, and optionally a salt, and returns an Apache md5 encoded password.
This function merely instantiates a new L<Apache2::API::Password> object, and calls the method L<hash|Apache2::API::Password/hash> to return the encoded password.
The password returned is suitable to be used and saved in an Apache password file used in web basic authentication.
Upon error, this will die.
=head1 CONSTANTS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/ASP/API.pm view on Meta::CPAN
my $api = Apache2::ASP::API->new();
my $res = $api->ua->post("/handlers/user.login", {
user_email => $email,
user_password => $password,
});
# Assuming $Session->{user} is set upon successful login:
unless( $api->session->{user} )
{
lib/Apache2/ASP/API.pm view on Meta::CPAN
use warnings 'all';
use base 'Apache2::ASP::API';
sub login
{
my ($s, $email, $password) = @_;
my $res = $s->ua->post("/handlers/user.login", {
user_email => $email,
user_password => $password
});
# Assuming $Session->{user} is set upon successful login:
unless( $api->session->{user} )
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AUS.pm view on Meta::CPAN
my $go_error = $table->{go_error} || $go;
if($table->{logout}) {
$session->logout;
return go($r, $go);
} elsif($table->{user} && $table->{password}) {
my $user = eval { $session->login(@$table{'user','password'}); };
my $err = $@;
$session->_set_status($session->STATUS_MODIFIED);
$session->flush;
if($err) {
auth_failure($r, $err);
lib/Apache2/AUS.pm view on Meta::CPAN
} else {
$r->user($user->{id});
return go($r, $go);
}
} else {
$r->subprocess_env('Username or password not specified.');
return go($r, $go_error);
}
}
sub Authen {
lib/Apache2/AUS.pm view on Meta::CPAN
=item Response
In Apache2::AUS, the C<Response> handler is responsible for logging the user
in. This handler will read any GET / POST arguments (via
L<Apache2::Request|Apache2::Request> so other handlers can use them later).
If "user" and "password" are supplied, a login will be attempted under that
user id. If "logout" is supplied, any logged-in user will be logged out.
If the login was unsuccessful, the AUS_AUTH_FAILURE environment
variable will be set to a string containing the reason why.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthAny/DB.pm view on Meta::CPAN
my $self = {};
unless ($dbHandle) {
my $dbUser = $ENV{AUTH_ANY_DB_USER} || die "Env variable AUTH_ANY_DB_USER required";
my $dbPasswordFile = $ENV{AUTH_ANY_DB_PW_FILE} || die "Env variable AUTH_ANY_DB_PW_FILE required";
open(PWD, "<$dbPasswordFile") || die "Could not read password file, '$dbPasswordFile'. $!";
my $dbPassword = <PWD>;
close(PWD) || die "ouch $!";
chomp $dbPassword; #remove the trailing new line
die "Could not get password" unless $dbPassword;
my $dbName = $ENV{AUTH_ANY_DB_NAME} || die "Env variable AUTH_ANY_DB_NAME required";
my $db;
$db = $ENV{AUTH_ANY_DB} || "mysql";
my $dsn = "database=$dbName";
my $dbHost = $ENV{AUTH_ANY_DB_HOST};
lib/Apache2/AuthAny/DB.pm view on Meta::CPAN
sub getBasicUser {
my $self = shift;
my ($user) = @_;
my $sql = 'select user, password from basicAuth WHERE user = ?';
$self->useDB();
return $dbHandle->selectrow_hashref($sql, undef, $user);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCAS/Configuration.pm view on Meta::CPAN
{ cmd_data => 'DbDriver', err_append => 'driver', },
{ cmd_data => 'DbDataSource', err_append => 'string', },
{ cmd_data => 'DbSessionTable', err_append => 'session_table', },
{ cmd_data => 'DbUser', err_append => 'username', },
{ cmd_data => 'DbPass', err_append => 'password', },
);
foreach my $directive (@directives)
{
$directive->{"name"} = "CAS" . $directive->{"cmd_data"};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCASSimple.pm view on Meta::CPAN
Apache2::AuthCASSimple - Apache2 module to authentificate through a CAS server
=head1 DESCRIPTION
Apache2::AuthCASSimple is an authentication module for Apache2/mod_perl2. It allow you to authentificate users through a Yale CAS server. It means you don't need to give login/password if you've already be authentificate by the CAS server, only ticke...
This module allow the use of simple text files for sessions.
=head1 SYNOPSIS
view all matches for this distribution
view release on metacpan or search on metacpan
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthColloquy.pm view on Meta::CPAN
# Handles Apache requests
sub handler {
my $r = shift;
my ($result, $password) = $r->get_basic_auth_pw;
return $result if $result;
my $user = $r->user;
my $users_lua = $r->dir_config('users_lua') || '/usr/local/colloquy/data';
my $allowaltauth = $r->dir_config('AllowAlternateAuth') || 'no';
lib/Apache2/AuthColloquy.pm view on Meta::CPAN
"user $user: invalid username contains disallowed characters ",
$r->uri);
return (lc($allowaltauth) eq "yes" ? Apache2::Const::DECLINED : Apache2::Const::HTTP_UNAUTHORIZED);
}
# Check we have a password
unless (length($password)) {
$r->note_basic_auth_failure;
$r->log_error("user $user: no password supplied for URI ", $r->uri);
return Apache2::Const::HTTP_UNAUTHORIZED;
}
# Read the database
my $users = {};
lib/Apache2/AuthColloquy.pm view on Meta::CPAN
$r->uri);
return (lc($allowaltauth) eq "yes" ? Apache2::Const::DECLINED : Apache2::Const::HTTP_UNAUTHORIZED);
}
# Check we have found that user
unless (exists $users->{"$user"}->{password2} || exists $users->{"$user"}->{password}) {
$r->note_basic_auth_failure;
$r->log_error(
"user $user: no valid user found for URI ",
$r->uri);
return (lc($allowaltauth) eq "yes" ? Apache2::Const::DECLINED : Apache2::Const::HTTP_UNAUTHORIZED);
}
# Now check the password
my $db_password_hash = $users->{"$user"}->{password2} || $users->{"$user"}->{password} || '_no_db_passd_';
my $our_password_hash = MD5->hexhash("$user$password") || '_no_usr_passd_';
if ($our_password_hash eq $db_password_hash) {
return Apache2::Const::OK;
} else {
$r->log_error(
"user $user: invalid password for URI ",
$r->uri);
return (lc($allowaltauth) eq "yes" ? Apache2::Const::DECLINED : Apache2::Const::HTTP_UNAUTHORIZED);
}
# Otherwise fail
lib/Apache2/AuthColloquy.pm view on Meta::CPAN
=head1 DESCRIPTION
Apache2::AuthColloquy is an Apache 2 authentication module. It will
authenticate against a Colloquy users.lua user database file using
the newer password2 field.
This script munges the users.lua file in to executable perl code
which is then evaluated. It should therefore be used with caution
if you cannot gaurentee the integrity of the users.lua file. See
Colloquy::Data for more details.
view all matches for this distribution