- Doxygen doc in progress

- lmLog display caller in case of level != debug
environments/ppa-mbqj77/deployments/1
Xavier Guimard 15 years ago
parent 65985c304f
commit 5dd15f78f3
  1. 2
      build/lemonldap-ng/scripts/DoxyGen/PerlFilter.pm
  2. 8
      build/lemonldap-ng/scripts/findMsg.pl
  3. 13
      modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/BuildWSDL.pm
  4. 2
      modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/SAML/Metadata.pm
  5. 3
      modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Regexp.pm
  6. 9
      modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm
  7. 9
      modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/UpdateCookie.pm
  8. 9
      modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CDA.pm
  9. 20
      modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/OpenID/Server.pm
  10. 14
      modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_LDAP.pm
  11. 58
      modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_SAML.pm

@ -123,6 +123,7 @@ sub filter {
$self->print("};\n");
}
$current_class = $args;
die "$line $command $args" unless($args);
$self->emit_class( $args, $line,
[ "\@$command $args", @more, "\@nosubgrouping" ] );
}
@ -395,6 +396,7 @@ s#Lemonldap/NG/(\w+)#"lemonldap-ng-".lc($1)."/lib/Lemonldap/NG/$1"#e;
$self->more( @$doc[ 1 .. $#$doc ] );
$self->end();
}
die unless($class);
$self->print("class $class");
if ( @current_isa or @current_priv_isa ) {

@ -18,6 +18,11 @@ foreach my $module (qw(common handler manager portal)) {
foreach my $file (@files) {
open F, $file;
$file =~ s#.*/NG/##;
$_ = <F>;
unless(/^##\s*\@file/){
push @{ $errorMsg->{$module}->{undocumented} }, $file;
next;
}
my $autoload = 0;
while (<F>) {
next if /^(?:\s*#|\*lmLog|sub lmLog)/;
@ -47,6 +52,9 @@ foreach my $module (qw(common handler manager portal)) {
close F;
}
print "\n###### " . uc($module) . " ######\n";
foreach ( @{ $errorMsg->{$module}->{undocumented} } ) {
print "## Undocumented ## $_\n";
}
foreach my $level (qw(error warn notice info)) {
foreach ( @{ $errorMsg->{$module}->{$level} } ) {
print "[$level] $_\n";

@ -1,9 +1,18 @@
## @file
# Utility to build WSDL files
## @class
# Class utility to build WSDL files
package Lemonldap::NG::Common::BuildWSDL;
use Lemonldap::NG::Common::Conf;
our $VERSION = '0.1';
## @cmethod Lemonldap::NG::Common::Conf new(hashref configStorage);
# Constructor
# @param $configStorage Configuration access parameters
# @return Lemonldap::NG::Common::Conf new object
sub new {
my ( $class, $configStorage ) = @_;
my $self = bless {}, $class;
@ -13,6 +22,10 @@ sub new {
return $self;
}
## @method string buildWSDL(string xml)
# Parse XML string to sustitute macros
# @param $xml XML string
# @return Parsed XML string
sub buildWSDL {
my ( $self, $xml ) = @_;
my $portal = $self->{conf}->{portal};

@ -1,4 +1,4 @@
##@class
##@file
# SAML Metadata object for Lemonldap::NG
##@class

@ -1,3 +1,6 @@
## @file
# Common regexp issued from Regexp::Common
package Lemonldap::NG::Common::Regexp;
use constant {

@ -194,14 +194,21 @@ sub logout_mp2 : method {
sub lmLog {
my ( $class, $mess, $level ) = splice @_;
die "Level is required" unless ($level);
my $call;
unless ( $level eq 'debug' ) {
my @tmp = caller();
$call = "$tmp[1] $tmp[2]:";
}
if ( MP() == 2 ) {
Apache2::ServerRec->log->debug($call) if ($call);
Apache2::ServerRec->log->$level($mess);
}
elsif ( MP() == 1 ) {
Apache->server->log->debug($call) if ($call);
Apache->server->log->$level($mess);
}
else {
print STDERR "$mess\n";
print STDERR "[$level] $mess\n";
}
}

@ -1,8 +1,13 @@
## @file
# Lemonldap::NG special handler
## @class
# Lemonldap::NG special handler
package Lemonldap::NG::Handler::UpdateCookie;
use strict;
use Lemonldap::NG::Handler::SharedConf qw(:all);
our @ISA = qw(Lemonldap::NG::Handler::SharedConf);
use base qw(Lemonldap::NG::Handler::SharedConf);
our $VERSION = '0.1';
@ -83,7 +88,7 @@ cookie sent by client, to reload session in local cache.
=head1 DESCRIPTION
Lemonldap::NG::Handler::UpdateCookie is a special Lemonldap::NG:: hander that
Lemonldap::NG::Handler::UpdateCookie is a special Lemonldap::NG:: handler that
allow a session to be removed from local cache of the current handler, if a
update cookie is sent by the user.

@ -1,3 +1,8 @@
## @file
# Deprecated: use "cda" parameter instead
## @class
# Deprecated: use "cda" parameter instead
package Lemonldap::NG::Portal::CDA;
use strict;
@ -14,6 +19,10 @@ use base ('Lemonldap::NG::Portal::SharedConf');
# OVERLOADED SUB #
##################
## @cmethod Lemonldap::NG::Portal::CDA new(array params)
# Call Lemonldap::NG::Portal::SharedConf::new() with "cda" parameter set to 1
# @param params Lemonldap::NG::Portal::SharedConf::new() parameters
# @return New Lemonldap::NG::Portal::CDA object
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);

@ -1,3 +1,8 @@
## @file
# Subclass of Net::OpenID::Server that manage OpenID extensions
## @class
# Subclass of Net::OpenID::Server that manage OpenID extensions
package Lemonldap::NG::Portal::OpenID::Server;
use strict;
@ -7,7 +12,8 @@ use Lemonldap::NG::Common::Regexp;
use constant DEBUG => 0;
our @ISA = qw(Net::OpenID::Server);
use base qw(Net::OpenID::Server);
our $VERSION = '0.1';
my $OPENID2_NS = qq!http://specs.openid.net/auth/2.0!;
@ -15,6 +21,10 @@ my $OPENID2_ID_SELECT = qq!http://specs.openid.net/auth/2.0/identifier_select!;
*_push_url_arg = *Net::OpenID::Server::_push_url_arg;
## @cmethod Lemonldap::NG::Portal::OpenID::Server new(hash opts)
# Call Net::OpenID::Server::new() and store extensions
# @param %opts Net::OpenID::Server options
# @return Lemonldap::NG::Portal::OpenID::Server new object
sub new {
my $class = shift;
my $self = fields::new($class);
@ -25,11 +35,19 @@ sub new {
#$self->{get_args} = sub { $self->param(@_) };
}
## @method protected void extensions()
# Manage "extensions" constructor parameter
sub extensions {
my $self = shift;
$self->{_extensions} = shift;
}
## @method protected list _mode_checkid(string mode, boolean redirect_for_setup)
# Overload Net::OpenID::Server::_mode_checkid to call extensions hook
# @param $mode OpenID mode
# @param $redirect_for_setup indicates that user must be redirected or not for
# setup
# @return (string $type, hashref parameters)
sub _mode_checkid {
my Lemonldap::NG::Portal::OpenID::Server $self = shift;
my ( $mode, $redirect_for_setup ) = @_;

@ -70,7 +70,7 @@ sub new {
return $self;
}
## @method Net::LDAP::Message bind(string dn, %args)
## @method Net::LDAP::Message bind(string dn, hash args)
# Reimplementation of Net::LDAP::bind(). Connection is done :
# - with $dn and $args->{password} as dn/password if defined,
# - or with Lemonldap::NG account,
@ -132,7 +132,7 @@ sub loadPP {
$ppLoaded = 1;
}
## @method protected int userBind(string dn, %args)
## @method protected int userBind(string dn, hash args)
# Call bind() with dn/password and return
# @param $dn LDAP distinguish name
# @param %args See Net::LDAP(3) manpage for more
@ -389,10 +389,10 @@ sub ldap {
## @method string searchGroups(string base, string key, string value, string attributes)
# Get groups from LDAP directory
# @param string base LDAP search base
# @param string key Attribute name in group containing searched value
# @param string value Searched value
# @param string attributes to get from found groups (array ref)
# @param base LDAP search base
# @param key Attribute name in group containing searched value
# @param value Searched value
# @param attributes to get from found groups (array ref)
# @return string groups separated with multiValuesSeparator
sub searchGroups {
my $self = shift;
@ -478,7 +478,7 @@ sub searchGroups {
## @method string getLdapValue(Net::LDAP::Entry entry, string attribute)
# Get the dn, or the attribute value with a separator for multi-valuated attributes
# @param Net::LDAP::Entry LDAP entry
# @param LDAP entry
# @param string attribute name
# @return string value
sub getLdapValue {

@ -533,8 +533,8 @@ sub checkMessage {
## @method boolean checkLassoError(Lasso::Error error, string level)
# Log Lasso error code and message if this is actually a Lasso::Error with code > 0
# @param Lasso::Error Lasso error object
# @param string optional log level (debug by default)
# @param error Lasso error object
# @param level optional log level (debug by default)
# @return 1 if no error
sub checkLassoError {
my ( $self, $error, $level ) = splice @_;
@ -561,11 +561,11 @@ sub checkLassoError {
## @method Lasso::Server createServer(string metadata, string private_key, string private_key_password, string private_key_enc, string private_key_enc_password, string certificate)
# Load service metadata and create Lasso::Server object
# @param string metadata
# @param string private key
# @param string optional private key password
# @param string optional private key for encryption
# @param string optional private key password for encryption
# @param string optional certificate
# @param private_key private key
# @param private_key_password optional private key password
# @param private_key_enc optional private key for encryption
# @param private_key_enc_password optional private key password for encryption
# @param certificate optional certificate
# @return Lasso::Server object
sub createServer {
my ( $self, $metadata, $private_key, $private_key_password,
@ -594,10 +594,10 @@ sub createServer {
## @method boolean addIDP(Lasso::Server server, string metadata, string public_key, string ca_cert_chain)
# Add IDP to an existing Lasso::Server
# @param Lasso::Server Lasso::Server object
# @param string metadata IDP metadata
# @param string optional public key
# @param string optional ca cert chain
# @param server Lasso::Server object
# @param metadata IDP metadata
# @param public_key optional public key
# @param ca_cert_chain optional ca cert chain
# @return boolean result
sub addIDP {
my ( $self, $server, $metadata, $public_key, $ca_cert_chain ) = splice @_;
@ -610,10 +610,10 @@ sub addIDP {
## @method boolean addSP(Lasso::Server server, string metadata, string public_key, string ca_cert_chain)
# Add SP to an existing Lasso::Server
# @param Lasso::Server Lasso::Server object
# @param string metadata SP metadata
# @param string optional public key
# @param string optional ca cert chain
# @param server Lasso::Server object
# @param metadata SP metadata
# @param public_key optional public key
# @param ca_cert_chain optional ca cert chain
# @return boolean result
sub addSP {
my ( $self, $server, $metadata, $public_key, $ca_cert_chain ) = splice @_;
@ -626,10 +626,10 @@ sub addSP {
## @method boolean addAA(Lasso::Server server, string metadata, string public_key, string ca_cert_chain)
# Add Attribute Authority to an existing Lasso::Server
# @param Lasso::Server Lasso::Server object
# @param string metadata AA metadata
# @param string optional public key
# @param string optional ca cert chain
# @param server Lasso::Server object
# @param metadata AA metadata
# @param public_key optional public key
# @param ca_cert_chain optional ca cert chain
# @return boolean result
sub addAA {
my ( $self, $server, $metadata, $public_key, $ca_cert_chain ) = splice @_;
@ -643,11 +643,11 @@ sub addAA {
## @method boolean addProvider(Lasso::Server server, int role, string metadata, string public_key, string ca_cert_chain)
# Add provider to an existing Lasso::Server
# @param Lasso::Server Lasso::Server object
# @param int role (IDP, SP or Both)
# @param string metadata IDP metadata
# @param string optional public key
# @param string optional ca cert chain
# @param server Lasso::Server object
# @param role (IDP, SP or Both)
# @param metadata IDP metadata
# @param public_key optional public key
# @param ca_cert_chain optional ca cert chain
# @return boolean result
sub addProvider {
my ( $self, $server, $role, $metadata, $public_key, $ca_cert_chain ) =
@ -946,9 +946,9 @@ sub createLogin {
## @method boolean initAuthnRequest(Lasso::Login login, string idp, int method)
# Init authentication request
# @param Lasso::Login login
# @param string entityID
# @param int HTTP method
# @param login Lasso::Login
# @param idp entityID
# @param method HTTP method
# @return boolean result
sub initAuthnRequest {
my ( $self, $login, $idp, $method ) = splice @_;
@ -960,7 +960,7 @@ sub initAuthnRequest {
## @method boolean buildAuthnRequestMsg(Lasso::Login login)
# Build authentication request message
# @param Lasso::Login login
# @param login Lasso::Login
# @return boolean result
sub buildAuthnRequestMsg {
my ( $self, $login ) = splice @_;
@ -973,7 +973,7 @@ sub buildAuthnRequestMsg {
## @method boolean processAuthnRequestMsg(Lasso::Login login, string request)
# Process authentication request message
# @param login Lasso::Login object
# @param response SAML request
# @param request SAML request
# @return result
sub processAuthnRequestMsg {
my ( $self, $login, $request ) = splice @_;

Loading…
Cancel
Save