- make tidy
- OpenID log levels - DIFFPREFIX in Makefile (for vservers,...)
This commit is contained in:
parent
cb7c1edc37
commit
84a56ef1d8
|
@ -98,6 +98,8 @@ SRCMANAGERDIR=lemonldap-ng-manager
|
||||||
EXAMPLELANG=en # For static Manager example only
|
EXAMPLELANG=en # For static Manager example only
|
||||||
ERASECONFIG=1 # Set to 0 if you do not want to replace your configuration
|
ERASECONFIG=1 # Set to 0 if you do not want to replace your configuration
|
||||||
|
|
||||||
|
DIFFPREFIX=
|
||||||
|
|
||||||
# Liberty Alliance support
|
# Liberty Alliance support
|
||||||
WITHLA=0 # Set to 1 if you want to install Liberty Alliance portal (deprecated by SAML2 support)
|
WITHLA=0 # Set to 1 if you want to install Liberty Alliance portal (deprecated by SAML2 support)
|
||||||
LASPPORTALDIR=$(DOCUMENTROOT)/liberty-alliance-sp-portal
|
LASPPORTALDIR=$(DOCUMENTROOT)/liberty-alliance-sp-portal
|
||||||
|
@ -560,30 +562,30 @@ diff: debian-diff
|
||||||
|
|
||||||
debian-diff:
|
debian-diff:
|
||||||
@# Portal
|
@# Portal
|
||||||
@$(DIFF) lemonldap-ng-portal/lib/Lemonldap/NG/Portal /usr/share/perl5/Lemonldap/NG/Portal ||true
|
@$(DIFF) lemonldap-ng-portal/lib/Lemonldap/NG/Portal $(DIFFPREFIX)/usr/share/perl5/Lemonldap/NG/Portal ||true
|
||||||
@$(DIFF) lemonldap-ng-portal/example/scripts/purgeCentralCache /usr/share/lemonldap-ng/bin/purgeCentralCache ||true
|
@$(DIFF) lemonldap-ng-portal/example/scripts/purgeCentralCache $(DIFFPREFIX)/usr/share/lemonldap-ng/bin/purgeCentralCache ||true
|
||||||
@$(DIFF) lemonldap-ng-portal/example/scripts/buildPortalWSDL /usr/share/lemonldap-ng/bin/buildPortalWSDL ||true
|
@$(DIFF) lemonldap-ng-portal/example/scripts/buildPortalWSDL $(DIFFPREFIX)/usr/share/lemonldap-ng/bin/buildPortalWSDL ||true
|
||||||
@for i in $(PORTALSKINS); do \
|
@for i in $(PORTALSKINS); do \
|
||||||
$(DIFF) -x 'jquery*' lemonldap-ng-portal/example/skins/$$i /usr/share/lemonldap-ng/portal-skins/$$i; \
|
$(DIFF) -x 'jquery*' lemonldap-ng-portal/example/skins/$$i $(DIFFPREFIX)/usr/share/lemonldap-ng/portal-skins/$$i; \
|
||||||
done ||true
|
done ||true
|
||||||
@$(DIFF) lemonldap-ng-portal/example/index_skin.pl /var/lib/lemonldap-ng/portal/index.pl ||true
|
@$(DIFF) lemonldap-ng-portal/example/index_skin.pl $(DIFFPREFIX)/var/lib/lemonldap-ng/portal/index.pl ||true
|
||||||
@$(DIFF) lemonldap-ng-portal/example/mail.pl /var/lib/lemonldap-ng/portal/mail.pl ||true
|
@$(DIFF) lemonldap-ng-portal/example/mail.pl $(DIFFPREFIX)/var/lib/lemonldap-ng/portal/mail.pl ||true
|
||||||
@$(DIFF) lemonldap-ng-portal/example/metadata.pl /var/lib/lemonldap-ng/portal/metadata.pl ||true
|
@$(DIFF) lemonldap-ng-portal/example/metadata.pl $(DIFFPREFIX)/var/lib/lemonldap-ng/portal/metadata.pl ||true
|
||||||
@$(DIFF) lemonldap-ng-portal/example/cdc.pl /var/lib/lemonldap-ng/portal/cdc.pl ||true
|
@$(DIFF) lemonldap-ng-portal/example/cdc.pl $(DIFFPREFIX)/var/lib/lemonldap-ng/portal/cdc.pl ||true
|
||||||
@# Handler
|
@# Handler
|
||||||
@$(DIFF) lemonldap-ng-handler/lib/Lemonldap/NG/Handler /usr/share/perl5/Lemonldap/NG/Handler ||true
|
@$(DIFF) lemonldap-ng-handler/lib/Lemonldap/NG/Handler $(DIFFPREFIX)/usr/share/perl5/Lemonldap/NG/Handler ||true
|
||||||
@# Common
|
@# Common
|
||||||
@$(DIFF) lemonldap-ng-common/lib/Lemonldap/NG/Common /usr/share/perl5/Lemonldap/NG/Common ||true
|
@$(DIFF) lemonldap-ng-common/lib/Lemonldap/NG/Common $(DIFFPREFIX)/usr/share/perl5/Lemonldap/NG/Common ||true
|
||||||
@$(DIFF) lemonldap-ng-common/lib/Lemonldap/NG/Common.pm /usr/share/perl5/Lemonldap/NG/Common.pm ||true
|
@$(DIFF) lemonldap-ng-common/lib/Lemonldap/NG/Common.pm $(DIFFPREFIX)/usr/share/perl5/Lemonldap/NG/Common.pm ||true
|
||||||
@$(DIFF) lemonldap-ng-common/scripts/lmMigrateConfFiles2ini /usr/share/lemonldap-ng/bin/lmMigrateConfFiles2ini ||true
|
@$(DIFF) lemonldap-ng-common/scripts/lmMigrateConfFiles2ini $(DIFFPREFIX)/usr/share/lemonldap-ng/bin/lmMigrateConfFiles2ini ||true
|
||||||
@$(DIFF) lemonldap-ng-common/scripts/convertConfig /usr/share/lemonldap-ng/bin/convertConfig ||true
|
@$(DIFF) lemonldap-ng-common/scripts/convertConfig $(DIFFPREFIX)/usr/share/lemonldap-ng/bin/convertConfig ||true
|
||||||
@# Manager
|
@# Manager
|
||||||
@$(DIFF) lemonldap-ng-manager/lib/Lemonldap/NG/Manager /usr/share/perl5/Lemonldap/NG/Manager ||true
|
@$(DIFF) lemonldap-ng-manager/lib/Lemonldap/NG/Manager $(DIFFPREFIX)/usr/share/perl5/Lemonldap/NG/Manager ||true
|
||||||
@$(DIFF) lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm /usr/share/perl5/Lemonldap/NG/Manager.pm ||true
|
@$(DIFF) lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm $(DIFFPREFIX)/usr/share/perl5/Lemonldap/NG/Manager.pm ||true
|
||||||
@$(DIFF) lemonldap-ng-manager/example/index.pl /var/lib/lemonldap-ng/manager/index.pl ||true
|
@$(DIFF) lemonldap-ng-manager/example/index.pl $(DIFFPREFIX)/var/lib/lemonldap-ng/manager/index.pl ||true
|
||||||
@$(DIFF) lemonldap-ng-manager/example/sessions.pl /var/lib/lemonldap-ng/manager/sessions.pl ||true
|
@$(DIFF) lemonldap-ng-manager/example/sessions.pl $(DIFFPREFIX)/var/lib/lemonldap-ng/manager/sessions.pl ||true
|
||||||
@for i in $(MANAGERSKINS); do \
|
@for i in $(MANAGERSKINS); do \
|
||||||
$(DIFF) -x 'jquery*' lemonldap-ng-manager/example/skins/$$i /usr/share/lemonldap-ng/manager-skins/$$i; \
|
$(DIFF) -x 'jquery*' lemonldap-ng-manager/example/skins/$$i $(DIFFPREFIX)/usr/share/lemonldap-ng/manager-skins/$$i; \
|
||||||
done ||true
|
done ||true
|
||||||
|
|
||||||
default-diff:
|
default-diff:
|
||||||
|
|
|
@ -74,7 +74,7 @@ sub confUpload {
|
||||||
my $appflag = 0;
|
my $appflag = 0;
|
||||||
|
|
||||||
# For POST URL keys
|
# For POST URL keys
|
||||||
my $postflag = 0;
|
my $postflag = 0;
|
||||||
my $postdataflag = 0;
|
my $postdataflag = 0;
|
||||||
|
|
||||||
# Unescape value
|
# Unescape value
|
||||||
|
@ -131,10 +131,10 @@ sub confUpload {
|
||||||
$postdataflag = 1;
|
$postdataflag = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$self->lmLog( "Entering POST URL $name", 'debug' );
|
$self->lmLog( "Entering POST URL $name", 'debug' );
|
||||||
$postflag = 1;
|
$postflag = 1;
|
||||||
$postname = $name;
|
$postname = $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Manage new keys
|
# Manage new keys
|
||||||
|
@ -716,11 +716,11 @@ sub setKeyToH {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$self->lmLog(
|
$self->lmLog(
|
||||||
"setKeyToH: set $value in key $k2 inside key $key",
|
"setKeyToH: set $value in key $k2 inside key $key",
|
||||||
'debug' );
|
'debug' );
|
||||||
$tmp->{$key}->{$k2} = $value;
|
$tmp->{$key}->{$k2} = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$self->lmLog( "setKeyToH: set $value in key $key", 'debug' );
|
$self->lmLog( "setKeyToH: set $value in key $key", 'debug' );
|
||||||
|
|
|
@ -59,13 +59,13 @@ sub extractFormInfo {
|
||||||
# Remote error
|
# Remote error
|
||||||
unless ( $csr->is_server_response() ) {
|
unless ( $csr->is_server_response() ) {
|
||||||
$self->{msg} = 'No OpenID valid message found' . $csr->err();
|
$self->{msg} = 'No OpenID valid message found' . $csr->err();
|
||||||
$self->lmLog( $self->{msg}, 'debug' );
|
$self->lmLog( $self->{msg}, 'info' );
|
||||||
return PE_BADCREDENTIALS;
|
return PE_BADCREDENTIALS;
|
||||||
}
|
}
|
||||||
|
|
||||||
# If confirmation is needed
|
# If confirmation is needed
|
||||||
if ( my $setup_url = $csr->user_setup_url ) {
|
if ( my $setup_url = $csr->user_setup_url ) {
|
||||||
$self->lmLog( 'OpenID confirmation needed', 'debug' );
|
$self->lmLog( 'OpenID confirmation needed', 'info' );
|
||||||
print $self->redirect($setup_url);
|
print $self->redirect($setup_url);
|
||||||
$self->quit();
|
$self->quit();
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ sub extractFormInfo {
|
||||||
# Check if user has refused to share his authentication
|
# Check if user has refused to share his authentication
|
||||||
elsif ( $csr->user_cancel() ) {
|
elsif ( $csr->user_cancel() ) {
|
||||||
$self->{msg} = "OpenID request cancelled by user";
|
$self->{msg} = "OpenID request cancelled by user";
|
||||||
$self->lmLog( $self->{msg}, 'debug' );
|
$self->lmLog( $self->{msg}, 'info' );
|
||||||
return PE_FIRSTACCESS;
|
return PE_FIRSTACCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ sub extractFormInfo {
|
||||||
# Other errors
|
# Other errors
|
||||||
else {
|
else {
|
||||||
$self->{msg} = 'OpenID error: ' . $csr->err;
|
$self->{msg} = 'OpenID error: ' . $csr->err;
|
||||||
$self->lmLog( $self->{msg}, 'debug' );
|
$self->lmLog( $self->{msg}, 'warn' );
|
||||||
return PE_ERROR;
|
return PE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ sub extractFormInfo {
|
||||||
# Check if url is valid
|
# Check if url is valid
|
||||||
unless ($claimed_identity) {
|
unless ($claimed_identity) {
|
||||||
$self->{msg} = "OpenID error : " . $self->{csr}->err();
|
$self->{msg} = "OpenID error : " . $self->{csr}->err();
|
||||||
$self->lmLog( $self->{msg}, 'debug' );
|
$self->lmLog( $self->{msg}, 'warn' );
|
||||||
return PE_BADCREDENTIALS;
|
return PE_BADCREDENTIALS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,13 @@
|
||||||
package Lemonldap::NG::Portal::OpenID::Server;
|
package Lemonldap::NG::Portal::OpenID::Server;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use fields qw(_extensions setup_url);
|
use base qw(Net::OpenID::Server);
|
||||||
|
use fields qw(_extensions);
|
||||||
use Net::OpenID::Server;
|
use Net::OpenID::Server;
|
||||||
use Lemonldap::NG::Common::Regexp;
|
use Lemonldap::NG::Common::Regexp;
|
||||||
|
|
||||||
use constant DEBUG => 0;
|
use constant DEBUG => 0;
|
||||||
|
|
||||||
use base qw(Net::OpenID::Server);
|
|
||||||
|
|
||||||
our $VERSION = '0.1';
|
our $VERSION = '0.1';
|
||||||
|
|
||||||
my $OPENID2_NS = qq!http://specs.openid.net/auth/2.0!;
|
my $OPENID2_NS = qq!http://specs.openid.net/auth/2.0!;
|
||||||
|
@ -91,7 +90,7 @@ sub _mode_checkid {
|
||||||
$extArgs{$tmp}->{$val} = scalar $self->args->($arg);
|
$extArgs{$tmp}->{$val} = scalar $self->args->($arg);
|
||||||
}
|
}
|
||||||
foreach my $ns ( keys %{ $self->{_extensions} } ) {
|
foreach my $ns ( keys %{ $self->{_extensions} } ) {
|
||||||
print STDERR "Launching OpenIP $ns hook\n" if(DEBUG);
|
print STDERR "Launching OpenIP $ns hook\n" if (DEBUG);
|
||||||
my $h;
|
my $h;
|
||||||
( $is_ext_trusted{$ns}, $h ) = $self->{_extensions}->{$ns}->(
|
( $is_ext_trusted{$ns}, $h ) = $self->{_extensions}->{$ns}->(
|
||||||
$u, $trust_root, $is_identity, $is_trusted,
|
$u, $trust_root, $is_identity, $is_trusted,
|
||||||
|
@ -99,7 +98,7 @@ sub _mode_checkid {
|
||||||
);
|
);
|
||||||
if ($h) {
|
if ($h) {
|
||||||
while ( my ( $k, $v ) = each %$h ) {
|
while ( my ( $k, $v ) = each %$h ) {
|
||||||
print STDERR "$ns returned data: $k => $v\n" if(DEBUG);
|
print STDERR "$ns returned data: $k => $v\n" if (DEBUG);
|
||||||
$extVars{"$ns.$k"} = $v;
|
$extVars{"$ns.$k"} = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ sub setSessionInfo {
|
||||||
'warn'
|
'warn'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$self->{mustRedirect} = 0;
|
||||||
return PE_MISSINGREQATTR;
|
return PE_MISSINGREQATTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user