Commit bfab1a6e authored by Yadd's avatar Yadd
Browse files

LEMONLDAP::NG Doxygen in progress

parent d82314f6
## @file
# Add get_key_from_all_sessions() function to Apache::Session modules.
# This file is used by Lemonldap::NG::Manager::Status and by the
# purgeCentralCache script.
#
# Warning, this works only with SQL databases, simple or Berkeley files (not
# for Apache::Session::Memcached for example)
package Lemonldap::NG::Common::Apache::Session;
use Storable qw(thaw);
......
## @file
# Client side of the SOAP proxy mechanism for Apache::Session modules
## @class
# Client side of the SOAP proxy mechanism for Apache::Session modules
package Lemonldap::NG::Common::Apache::Session::SOAP;
use strict;
......@@ -16,6 +21,9 @@ BEGIN {
# PUBLIC INTERFACE
## @cmethod Lemonldap::NG::Common::Apache::Session::SOAP TIEHASH(string session_id, hashRef args)
# Constructor for Perl TIE mechanism. See perltie(3) for more.
# @return Lemonldap::NG::Common::Apache::Session::SOAP object
sub TIEHASH {
my $class = shift;
......@@ -100,8 +108,8 @@ sub DESTROY {
$self->save;
}
# INTERNAL SUBROUTINES
## @method private SOAP::Lite _connect()
# @return The SOAP::Lite object. Build it at the first call.
sub _connect {
my $self = shift;
return $self->{service} if ( $self->{service} );
......@@ -113,29 +121,43 @@ sub _connect {
return $self->{service} = SOAP::Lite->ns( $self->{ns} )->proxy(@args);
}
## @method private $ _soapCall(string func, @args)
# @param $func remote function to call
# @param @args Functions parameters
# @return Result
sub _soapCall {
my $self = shift;
my $func = shift;
return $self->_connect->$func(@_)->result;
}
## @method hashRef get(string id)
# @param $id Apache::Session session ID.
# @return User datas
sub get {
my $self = shift;
my $id = shift;
return $self->{data} = $self->_soapCall( "get", $id );
}
## @method hashRef newsession()
# Build a new Apache::Session session.
# @return User datas (just the session ID)
sub newsession {
my $self = shift;
return $self->{data} = $self->_soapCall( "newsession" );
}
## @method boolean save()
# Save user datas if modified.
sub save {
my $self = shift;
return unless ($self->{modified});
return $self->_soapCall( "set", $self->{data}->{_session_id}, $self->{data} );
}
## @method boolean delete()
# Deletes the current session.
sub delete {
my $self = shift;
return $self->_soapCall( "delete", $self->{data}->{_session_id} );
......
## @file
# Base package for all Lemonldap::NG CGI
#
# @copy 2005, 2006, 2007, 2008, Xavier Guimard <x.guimard@free.fr>
## @class
# Base class for all Lemonldap::NG portal CGI
# Base class for all Lemonldap::NG CGI
package Lemonldap::NG::Common::CGI;
use strict;
......@@ -17,6 +15,10 @@ our $VERSION = '0.31';
use base qw(CGI);
## @method void soapTest(string soapFunctions)
# Check if request is a SOAP request. If it is, launch
# Lemonldap::NG::Common::CGI::SOAPServer and exit. Else simply return.
# @param $soapFunctions list of authorized functions.
sub soapTest {
my $self = shift;
my $soapFunctions = shift || $self->{SOAPFunctions};
......@@ -33,9 +35,17 @@ sub soapTest {
->handle($self);
exit;
}
return $self;
}
## @method string header_public(string filename)
# Implements the "304 Not Modified" HTTP mechanism.
# If HTTP request contains an "If-Modified-Since" header and if
# $filename was not modified since, prints the "304 Not Modified" response and
# exit. Else, launch CGI::header() with "Cache-Control" and "Last-Modified"
# headers.
# @param $filename Optional name of the reference file. Default
# $ENV{SCRIPT_FILENAME}.
# @return Common Gateway Interface standard response header
sub header_public {
my $self = shift;
my $filename = shift;
......@@ -80,6 +90,11 @@ sub header_public {
);
}
## @method void abort(string title, string text)
# Display an error message and exit.
# Used instead of die() in Lemonldap::NG CGIs.
# @param title Title of the error message
# @param text Optional text. Default: "See Apache's logs"
sub abort {
my $self = shift;
my $cgi = CGI->new;
......
## @file
# SOAP support for Lemonldap::NG::Common::CGI
## @class
# SOAP support for Lemonldap::NG::Common::CGI
package Lemonldap::NG::Common::CGI::SOAPServer;
use SOAP::Transport::HTTP;
use base 'SOAP::Transport::HTTP::Server';
use base qw(SOAP::Transport::HTTP::Server);
sub DESTROY { SOAP::Trace::objects('()') }
## @cmethod Lemonldap::NG::Common::CGI::SOAPServer new(@param)
# @param @param SOAP::Transport::HTTP::Server::new() parameters
# @return Lemonldap::NG::Common::CGI::SOAPServer object
sub new {
my $self = shift;
return $self if ref $self;
......@@ -15,6 +23,8 @@ sub new {
return $self;
}
## @method handle(CGI cgi)
#
sub handle {
my $self = shift->new;
my $cgi = shift;
......
## @file
# Alias for Lemonldap::NG::Handler::SharedConf
## @class
# Alias for Lemonldap::NG::Handler::SharedConf
package Lemonldap::NG::Handler;
our $VERSION = "0.9";
our @ISA = ('Lemonldap::NG::Handler::SharedConf');
use Lemonldap::NG::Handler::SharedConf;
use base qw(Lemonldap::NG::Handler::SharedConf);
1;
......
##@file
# Auth-basic authentication with Lemonldap::NG rights management
#
#@copy 2008 Xavier Guimard <x.guimard@free.fr>
##@class
# Auth-basic authentication with Lemonldap::NG rights management
......
##@file
# Cross-domain mechanism for handler
#
#@copy 2005, 2006, 2007, 2008 Xavier Guimard <x.guimard@free.fr>
##@class
# Cross-domain mechanism for handler
......
## @file
# Auto-protected CGI machanism
#
# @copy 2008 Xavier Guimard <x.guimard@free.fr>
## @class
# Base class for auto-protected CGI
......
## @file
# Perl based proxy used to replace mod_proxy
#
# @copy 2005, 2006, 2007, 2008 Xavier Guimard <x.guimard@free.fr>
## @class
# Perl based proxy used to replace mod_proxy
......
## @file
# Main handler.
#
# @copy 2005, 2006, 2007, 2008 Xavier Guimard <x.guimard@free.fr>
## @class
# Main handler.
......
## @file
# Base file for Lemonldap::NG handlers
#
# @copy 2005, 2006, 2007, 2008 Xavier Guimard <x.guimard@free.fr>
## @class
# Base class for Lemonldap::NG handlers.
......
## @file
# Status process mechanism
#
# @copy 2008 Xavier Guimard <x.guimard@free.fr>
package Lemonldap::NG::Handler::Status;
......
## @file
# Virtual host support mechanism
#
# @copy 2005, 2006, 2007, 2008 Xavier Guimard <x.guimard@free.fr>
## @class
# This class adds virtual host support for Lemonldap::NG handlers.
......
## @file
# Alias for Lemonldap::NG::SharedConf
## @class
# Alias for Lemonldap::NG::SharedConf
package Lemonldap::NG::Portal;
our $VERSION = "0.86";
our @ISA = ('Lemonldap::NG::Portal::SharedConf');
use Lemonldap::NG::Portal::SharedConf;
use base 'Lemonldap::NG::Portal::SharedConf';
1;
......
##@file
# Apache authentication backend file
#
#@copy 2008, Xavier Guimard <x.guimard@free.fr>
##@class
# Apache authentication backend class
......
##@file
# CAS authentication backend file
#
#@copy 2008, Xavier Guimard <x.guimard@free.fr>
##@class
# CAS authentication backend class
......
##@file
# LDAP authentication backend file
#
#@copy 2008, Xavier Guimard <x.guimard@free.fr>
##@class
# LDAP authentication backend class
......
##@file
# SSL authentication backend file
#
#@copy 2008, Xavier Guimard <x.guimard@free.fr>
##@class
# SSL authentication backend class
......
##@file
# Cross domain extension for Lemonldap::NG portals.
##@class
# Cross domain extension for Lemonldap::NG portals.
package Lemonldap::NG::Portal::CDA;
use strict;
......@@ -14,16 +19,17 @@ use base ('Lemonldap::NG::Portal::SharedConf');
# OVERLOADED SUB #
##################
# 2. Existing sessions are validated so users coming from an other domain
# are not re-prompted
## @method int existingSession()
# Existing sessions must not be reauthenticated in CDA usage
# @return Lemonldap::NG::Portal error code
sub existingSession {
my ( $self, $id, $datas ) = @_;
PE_DONE;
}
# 16. If the user was redirected to the portal, we will now redirect him
# to the requested URL. If it does not come from our domain, we add
# ID in URL
## @method int autoRedirect()
# Same as Lemonldap::NG::Portal::SharedConf::autoRedirect(), but add ID in URL
# if the user was redirected to the portal from another domain.
# @return Lemonldap::NG::Portal error code
sub autoRedirect {
my $self = shift;
my $tmp = $self->{domain};
......
##@file
# Menu for Lemonldap::NG portal
#
#@copy 2008 Clement OUDOT <clement@oodo.net> <coudot@linagora.com>
##@class
# Menu class for Lemonldap::NG portal
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment