Commit ffb5ee8e authored by Xavier Guimard's avatar Xavier Guimard

Doxygen filter modification to show authentication process methods

parent bff9a423
......@@ -143,23 +143,26 @@ sub more {
my @order = (
'Public Initialization Methods',
'Public Initialization Functions',
'Public Class Methods',
'Public Authentication Process Methods',
'Public Running Methods',
'Public Running Functions',
'Public Class Methods',
'Public Object Methods',
'Public Functions',
'Protected Initialization Methods',
'Protected Initialization Functions',
'Protected Class Methods',
'Protected Authentication Process Methods',
'Protected Running Methods',
'Protected Running Functions',
'Protected Class Methods',
'Protected Object Methods',
'Protected Functions',
'Private Initialization Methods',
'Private Initialization Functions',
'Private Class Methods',
'Private Authentication Process Methods',
'Private Running Methods',
'Private Running Functions',
'Private Class Methods',
'Private Object Methods',
'Private Functions',
);
......
......@@ -120,6 +120,15 @@ sub filter {
$self->start("\@fn $args")->more(@more)->end;
$self->print($args, ";\n");
$self->pop;
} elsif ($command eq 'apmethod') {
unless ($args) {
($args) = $self->analyze_sub( $line-1 );
}
$args = $self->munge_parameters($args);
$self->push($self->protection($args).' Authentication Process Methods');
$self->start("\@fn $args")->more(@more)->end;
$self->print($args, ";\n");
$self->pop;
} elsif ($command eq 'rmethod') {
unless ($args) {
($args) = $self->analyze_sub( $line-1 );
......
......@@ -10,6 +10,11 @@ use SOAP::Lite;
our $VERSION = 0.3;
#parameter proxy Url of SOAP service
#parameter proxyOptions SOAP::Lite options
#parameter User Username
#parameter Password Password
# Variables shared with SOAP::Transport::HTTP::Client
our ( $user, $password ) = ( '', '' );
......
......@@ -13,6 +13,8 @@ use CGI;
#inherits Lemonldap::NG::Common::CGI::SOAPServer
#parameter syslog Indicates syslog facility for logging user actions
our $VERSION = '0.4';
use base qw(CGI);
......@@ -81,10 +83,8 @@ sub soapTest {
# If non form encoded datas are posted, we call SOAP Services
if ( $ENV{HTTP_SOAPACTION} ) {
require
Lemonldap::NG::Common::CGI::SOAPServer; #link protected dispatcher
require
Lemonldap::NG::Common::CGI::SOAPService; #link protected soapService
require Lemonldap::NG::Common::CGI::SOAPServer; #link protected dispatcher
require Lemonldap::NG::Common::CGI::SOAPService; #link protected soapService
my @func = (
ref($soapFunctions) ? @$soapFunctions : split /\s+/,
$soapFunctions
......
......@@ -30,7 +30,7 @@ our %_confFiles;
# Succeed if it has found a way to access to Lemonldap::NG configuration with
# $arg (or default file). It can be :
# - Nothing: default configuration file is tested,
# - { File => "/path/to/storage.conf" },
# - { confFile => "/path/to/storage.conf" },
# - { Type => "File", dirName => "/path/to/conf/dir/" },
# - { Type => "DBI", dbiChain => "DBI:mysql:database=lemonldap-ng;host=1.2.3.4",
# dbiUser => "user", dbiPassword => "password" },
......
......@@ -5,6 +5,9 @@ use SOAP::Lite;
our $VERSION = 0.2;
#parameter proxy Url of SOAP service
#parameter proxyOptions SOAP::Lite parameters
BEGIN {
*Lemonldap::NG::Common::Conf::_soapCall = \&_soapCall;
*Lemonldap::NG::Common::Conf::_connect = \&_connect;
......
......@@ -23,6 +23,7 @@ use Lemonldap::NG::Common::Conf; #link protected lmConf
use Cache::Cache qw($EXPIRES_NEVER);
use base qw(Lemonldap::NG::Handler::Vhost Lemonldap::NG::Handler::Simple);
#parameter reloadTime Time in second between 2 configuration check (600)
our $VERSION = '0.7';
our $cfgNum = 0;
......
......@@ -7,7 +7,7 @@ package Lemonldap::NG::Manager::Sessions;
use strict;
use Lemonldap::NG::Handler::CGI qw(:globalStorage :locationRules);
use Lemonldap::NG::Common::Apache::Session; #inherits
use Lemonldap::NG::Common::Apache::Session; #inherits
#inherits Apache::Session
......@@ -32,8 +32,8 @@ sub new {
or $class->abort( 'Unable to start ' . __PACKAGE__,
'See Apache logs for more' );
foreach (qw(jqueryUri personnalCss imagePath)) {
$self->{$_} = $args->{ $_
}; # or print STDERR "Warning, $_ is not set, falling to default value\n";
$self->{$_}
or $self->lmLog( "$_ is not set, falling to default value", 'debug' );
}
eval "use $globalStorage";
$class->abort( "Unable to load $globalStorage", $@ ) if ($@);
......
......@@ -10,13 +10,20 @@ use Lemonldap::NG::Portal::Simple;
our $VERSION = '0.11';
## @method int authInit()
## @apmethod int authInit()
# @return Lemonldap::NG::Portal constant
sub authInit {
PE_OK;
}
## @method int extractFormInfo()
## @apmethod int setAuthSessionInfo()
# Does nothing here.
# @return Lemonldap::NG::Portal constant
sub setAuthSessionInfo {
PE_OK;
}
## @apmethod int extractFormInfo()
# Read username return by Apache authentication system.
# By default, authentication is valid if REMOTE_USER environment
# variable is set.
......@@ -34,7 +41,7 @@ sub extractFormInfo {
PE_OK;
}
# @method int authenticate()
# @apmethod int authenticate()
# Does nothing.
# @return Lemonldap::NG::Portal constant
sub authenticate {
......
......@@ -11,14 +11,14 @@ use AuthCAS;
our $VERSION = '0.04';
## @method int authInit()
## @apmethod int authInit()
# Does nothing.
# @return Lemonldap::NG::Portal constant
sub authInit {
PE_OK;
}
## @method int extractFormInfo()
## @apmethod int extractFormInfo()
# Read username return by CAS authentication system.
# If user isn't authenticated, redirect it to CAS portal.
# @return Lemonldap::NG::Portal constant
......@@ -45,7 +45,14 @@ sub extractFormInfo {
PE_OK;
}
## @method int authenticate()
## @apmethod int setAuthSessionInfo()
# Does nothing here.
# @return Lemonldap::NG::Portal constant
sub setAuthSessionInfo {
PE_OK;
}
## @apmethod int authenticate()
# Does nothing.
# @return Lemonldap::NG::Portal constant
sub authenticate {
......
......@@ -16,7 +16,7 @@ use base qw(Lemonldap::NG::Portal::_WebForm);
*_formateFilter = *Lemonldap::NG::Portal::UserDBLDAP::formateFilter;
*_search = *Lemonldap::NG::Portal::UserDBLDAP::search;
## @method int authenticate()
## @apmethod int authenticate()
# Authenticate user by LDAP mechanism.
# @return Lemonldap::NG::Portal constant
sub authenticate {
......
......@@ -13,7 +13,7 @@ use base qw(Lemonldap::NG::Portal::AuthLDAP);
our $VERSION = '0.11';
## @method int authInit()
## @apmethod int authInit()
# Check if SSL environment variables are set.
# @return Lemonldap::NG::Portal constant
sub authInit {
......@@ -28,7 +28,7 @@ sub authInit {
# Directory.
# So authenticate is overloaded to return only PE_OK.
## @method int extractFormInfo()
## @apmethod int extractFormInfo()
# Read username in SSL environment variables.
# If $ENV{$self->{SSLVar}} is not set and SSLRequire is not set to 1, call
# Lemonldap::NG::Portal::AuthLDAP::extractFormInfo()
......@@ -52,7 +52,7 @@ sub extractFormInfo {
return $self->SUPER::extractFormInfo(@_);
}
## @method int authenticate()
## @apmethod int authenticate()
# Call Lemonldap::NG::Portal::AuthLDAP::authenticate() if user was not
# authenticated by SSL.
# @return Lemonldap::NG::Portal constant
......
......@@ -19,14 +19,14 @@ use base ('Lemonldap::NG::Portal::SharedConf');
# OVERLOADED SUB #
##################
## @method int existingSession()
## @apmethod int existingSession()
# Existing sessions must not be reauthenticated in CDA usage
# @return Lemonldap::NG::Portal error code
sub existingSession {
PE_DONE;
}
## @method int autoRedirect()
## @apmethod 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
......
......@@ -12,8 +12,8 @@ use XML::LibXML;
use XML::LibXSLT;
use CGI::Cookie;
#link protected dbi Lemonldap::NG::Portal::Notification::DBI
#link protected file Lemonldap::NG::Portal::Notification::File
#inherits Lemonldap::NG::Portal::Notification::DBI
#inherits Lemonldap::NG::Portal::Notification::File
our $VERSION = '0.01';
our ( $msg, $stylesheet, $parser );
......
......@@ -20,7 +20,7 @@ use base qw(Lemonldap::NG::Portal::Simple);
# OVERLOADED SUB #
##################
## @method boolean getConf(hashRef args)
## @method protected boolean getConf(hashRef args)
# Copy all parameters returned by the Lemonldap::NG::Common::Conf object in $self.
# @param args hash
# @return True
......
......@@ -348,9 +348,9 @@ sub getRemoteSession {
# If lemonldap cookie exists, reads it and search session. If the session is
# available, update datas with $info.
#@param $infos hash
# TODO: update all caches
sub updateSession {
# TODO: update all caches
my $self = shift;
my ($infos) = @_;
my %cookies = fetch CGI::Cookie;
......@@ -399,14 +399,14 @@ sub updateStatus {
if ($Lemonldap::NG::Handler::Simple::statusPipe);
}
##@method protected Lemonldap::NG::Portal::Notification notification()
#@return Lemonldap::NG::Portal::Notification object
##@method protected string notification()
#@return Notification stored by checkNotification()
sub notification {
my ($self) = @_;
return $self->{_notification};
}
##@method string get_url()
##@method protected string get_url()
# check url against XSS attacks
# @return url parameter if good, nothing else.
sub get_url {
......@@ -521,7 +521,7 @@ sub process {
return ( ( $self->{error} > 0 ) ? 0 : 1 );
}
##@method int controlUrlOrigin()
##@apmethod int controlUrlOrigin()
# 1) If the user was redirected here, loads 'url' parameter.
#@return Lemonldap::NG::Portal constant
sub controlUrlOrigin {
......@@ -552,7 +552,7 @@ m#^https?://(?:$self->{reVHosts}|(?:[^/]*)?$self->{domain})(?::\d+)?(?:/.*)?$#
PE_OK;
}
##@method int checkNotifBack()
##@apmethod int checkNotifBack()
# 2) Checks if a message has been notified to the connected user.
# Call Lemonldap::NG::Portal::Notification::checkNotification()
#@return Lemonldap::NG::Portal error code
......@@ -573,7 +573,7 @@ sub checkNotifBack {
PE_OK;
}
##@method int controlExistingSession(string id)
##@apmethod int controlExistingSession(string id)
# 3) Control existing sessions.
# To overload to control what to do with existing sessions.
# what to do with existing sessions ?
......@@ -646,6 +646,13 @@ sub controlExistingSession {
PE_OK;
}
## @method int existingSession()
# Launched by controlExistingSession() to know what to do with existing
# sessions.
# Can return :
# - PE_DONE : session is unchanged and process() return true
# - PE_OK : process() return false to display the form
#@return Lemonldap::NG::Portal constant
sub existingSession {
#my ( $self, $id, $datas ) = @_;
......@@ -668,7 +675,7 @@ sub existingSession {
# 9. setSessionInfo() : must be implemented in User* module:
# * store exported datas in $self->{sessionInfo}
##@method int setMacro()
##@apmethod int setMacro()
# 10) macro mechanism.
# * store macro results in $self->{sessionInfo}
#@return Lemonldap::NG::Portal constant
......@@ -682,7 +689,7 @@ sub setMacros {
PE_OK;
}
##@method int setGroups()
##@apmethod int setGroups()
# 11) groups mechanism.
# * store all groups name that the user match in
# $self->{sessionInfo}->{groups}
......@@ -715,8 +722,9 @@ sub setGroups {
PE_OK;
}
# 12. authenticate() : must be implemented in Auth* module:
# * authenticate the user if not done before
##@apmethod int authenticate()
# 12. authenticate() : must be implemented in Auth* module.
#@return Lemonldap::NG::Portal constant
sub authenticate {
my $self = shift;
my $tmp;
......@@ -726,7 +734,7 @@ sub authenticate {
PE_OK;
}
##@method int store()
##@apmethod int store()
# 13) Store user's datas in sessions database.
# Now, the user is known, authenticated and session variable are evaluated.
# It's time to store his parameters with Apache::Session::* module
......@@ -746,7 +754,7 @@ sub store {
PE_OK;
}
##@method int buildCookie()
##@apmethod int buildCookie()
# 14) Build the Lemonldap::NG cookie.
#@return Lemonldap::NG::Portal constant
sub buildCookie {
......@@ -763,7 +771,7 @@ sub buildCookie {
PE_OK;
}
##@method int checkNotification()
##@apmethod int checkNotification()
# 15) Check if messages has to be notified.
# Call Lemonldap::NG::Portal::Notification::getNotification().
#@return Lemonldap::NG::Portal constant
......@@ -778,7 +786,7 @@ sub checkNotification {
return PE_OK;
}
##@method int autoRedirect()
##@apmethod int autoRedirect()
# 16) If the user was redirected to the portal, we will now redirect him
# to the requested URL.
#@return Lemonldap::NG::Portal constant
......
......@@ -17,7 +17,7 @@ sub userDBInit {
PE_OK;
}
## @method int getUser()
## @apmethod int getUser()
# 7) Launch formateFilter() and search()
# @return Lemonldap::NG::Portal constant
sub getUser {
......@@ -25,7 +25,7 @@ sub getUser {
return $self->_subProcess(qw(formateFilter search));
}
## @method int formateFilter()
## @apmethod protected int formateFilter()
# Set the LDAP filter.
# By default, the user is searched in the LDAP server with its UID.
# @return Lemonldap::NG::Portal constant
......@@ -38,7 +38,7 @@ sub formateFilter {
PE_OK;
}
## @method int search()
## @apmethod protected int search()
# Search the LDAP DN of the user.
# @return Lemonldap::NG::Portal constant
sub search {
......@@ -63,7 +63,7 @@ sub search {
PE_OK;
}
## @method int setSessionInfo()
## @apmethod int setSessionInfo()
# 7) Load all parameters included in exportedVars parameter.
# Multi-value parameters are loaded in a single string with
# '; ' separator
......
......@@ -8,14 +8,14 @@ package Lemonldap::NG::Portal::_WebForm;
use Lemonldap::NG::Portal::Simple qw(:all);
use strict;
## @method int authInit()
## @apmethod int authInit()
# Does nothing.
# @return Lemonldap::NG::Portal constant
sub authInit {
PE_OK;
}
## @method int extractFormInfo()
## @apmethod int extractFormInfo()
# Read username and password from POST datas
# @return Lemonldap::NG::Portal constant
sub extractFormInfo {
......@@ -28,7 +28,7 @@ sub extractFormInfo {
PE_OK;
}
## @method int setAuthSessionInfo()
## @apmethod int setAuthSessionInfo()
# Set password in session datas if wanted.
# @return Lemonldap::NG::Portal constant
sub setAuthSessionInfo {
......
Markdown is supported
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