CGISession

 view release on metacpan or  search on metacpan

Session/Session.pm  view on Meta::CPAN

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

=item CGI::Session::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::Session::LDAPServer objects.

=cut

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


=item CGI::Session::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::Session::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::Session::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::Session::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::Session::auto_refresh_cookie

Accessor method.  Normally the cookie will expire X seconds after it is created, where X is
specified by CGI::Session::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::Session::used_with_custom_cgi

Forget about this one.  This is an internal function used by CGI::Session and CGI::Session::CGI.
Normally set to zero.  Setting CGI::Session::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}; }


=item CGI::Session::cookie_jar

# Cookiejar.  This handles all cookie storage.
#
Accessor method.  The object encapsulating cookie storage.

=cut

sub cookie_jar { my $self=shift; @_ ? $self->{cookie_jar}=shift : $self->{cookie_jar}; }




=item CGI::Session::passkey_name

Accessor method.  The name of the passkey field in the form is stored here.
Not currently important, but it will be if/when the table becomes a shared
resource.

=cut

sub passkey_name { my $self=shift; @_ ? $self->{passkey_name}=shift : $self->{passkey_name}; }


=item CGI::Session::debug

Accessor method.  Turns on debugging.  Currently this doesn't do much.  I need
to add more instrumentation.

=cut

sub debug { my $self=shift; @_ ? $self->{debug}=shift : defined $self->{debug}; }


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


=item CGI::Session::has_passkey

  True if the CGI session has a value for the parameter specified with
  -passkey_name.

  print "Session has passkey: ".( $session->has_passkey ? "YES" : "NO" )."\n";



( run in 0.547 second using v1.01-cache-2.11-cpan-39bf76dae61 )