CGISession

 view release on metacpan or  search on metacpan

Session/CVS/Base/LDAPSession.pm  view on Meta::CPAN

=item Authentication Behavior Variables

These are variables which affect the behavior of the authentication mechanism.

=item CGI::LDAPSession::auth_servers($;$)

Accessor method.  The list of authentication servers which will be contacted.  This value can either
be a single server or a reference to an array of servers.

Currently these servers are definied by CGI::LDAPSession::LDAPServer objects.

=cut

sub auth_servers($;$) { my $self=shift; @_ ? $self->{auth_servers}=shift : $self->{auth_servers}; }


=item CGI::LDAPSession::restricted_access($;$)

Accessor method.  If set to a non-zero value then the allowed_user_file is turned on.

=cut

sub restricted_access($;$) { my $self=shift; @_ ? $self->{restricted_access}=shift : $self->{restricted_access}; }


=item CGI::LDAPSession::allowed_user_file($;$)

Accessor method.  The full path to the allowed_user_file.

=cut

sub allowed_user_file($;$) { my $self=shift; @_ ? $self->{allowed_user_file}=shift : $self->{allowed_user_file}; }


=item CGI::LDAPSession::unikey($;$)

Accessor method.  Boy this one sucks.  This is a backdoor value.  If this is
set then any user matching this ID will be successfully authenticated.  Why?  Strictly
for testing.  NEVER, EVER SET THIS VALUE UNLESS YOU KNOW WHAT THE FUCK YOU ARE DOING.

=cut

sub unikey($;$) { my $self=shift; @_ ? $self->{unikey}=shift : $self->{unikey}; }


=item CGI::LDAPSession::register($;$)

Accessor method.  Login requires an entry to exist in the cookie table for each user.
If this variable is set then an entry will automatically be created for users which are
successfully authenticated.

=cut

sub register($;$) { my $self=shift; @_ ? $self->{register}=shift : $self->{register}; }


=item CGI::LDAPSession::auto_refresh_cookie($;$)

Accessor method.  Normally the cookie will expire X seconds after it is created, where X is
specified by CGI::LDAPSession::cookie_expiration.  Whenever the cookie is refreshed this
timer resets.  Setting this variable to a non-zero value causes the cookie to be refreshed
every time that it is successfully verified.

=cut

sub auto_refresh_cookie($;$) { my $self=shift; @_ ? $self->{auto_refresh_cookie}=shift : $self->{auto_refresh_cookie}; }


=item CGI::LDAPSession::used_with_custom_cgi($;$)

Forget about this one.  This is an internal function used by CGI::LDAPSession and CGI::LDAPSession::CGI.
Normally set to zero.  Setting CGI::LDAPSession::CGI::session causes this value to be set.

=cut

sub used_with_custom_cgi($;$) { my $self=shift; @_ ? $self->{used_with_custom_cgi}=shift : $self->{used_with_custom_cgi}; }



# DBI structures and connection state.
#
=item DBI Structures and Connection State

Interal accessor methods pertaining to various aspects of the database connection.
These WILL change in future releases, and are documented here for the developer's
use.

=item CGI::LDAPSession::dbi($;$)

Accessor method.  The active DBI connection.  The connection to the database will be created
when first required, and the DBI connection will be cached in this variable.

=cut

sub dbi($;$) { my $self=shift; @_ ? $self->{dbi}=shift : $self->{dbi}; }


=item CGI::LDAPSession::dbi_statement($;$)

Accessor method.  Internal use only.  The current DBI statement.

=cut

sub dbi_statement($;$) { my $self=shift; @_ ? $self->{dbi_statement}=shift : $self->{dbi_statement}; }


=item CGI::LDAPSession::dbi_results($;$)

Accessor method.  Internal use only.  The current results object.

=cut

sub dbi_results($;$) { my $self=shift; @_ ? $self->{dbi_results}=shift : $self->{dbi_results}; }


=item CGI::LDAPSession::dbi_results($;$)

Accessor method.  Internal use only.  The prefetched results from a results object.
Not really necessary with DBI, but I haven't altered the original authentication logic
that required this.



( run in 1.311 second using v1.01-cache-2.11-cpan-7fcb06a456a )