From 954a9fe5d55fb9cb17ddae971cc65d9dca39eced Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Mon, 14 Oct 2013 09:46:07 +0000 Subject: [PATCH] Modify authenticate() to be sure that SSL authentication has been done See: http://mail.ow2.org/wws/arc/lemonldap-ng-dev/2013-10/msg00018.html --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthSSL.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthSSL.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthSSL.pm index 9764d8f21..4f1c785d1 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthSSL.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthSSL.pm @@ -9,7 +9,7 @@ use strict; use Lemonldap::NG::Portal::Simple; use Lemonldap::NG::Portal::AuthNull; -our $VERSION = '1.2.3'; +our $VERSION = '1.3.0'; our @ISA = qw(Lemonldap::NG::Portal::AuthNull); ## @apmethod int authInit() @@ -56,10 +56,12 @@ sub setAuthSessionInfo { } ## @apmethod int authenticate() -# Does nothing, job is done in extractFormInfo() +# Just test that SSL authentication has been done: job is done in +# extractFormInfo() # @return Lemonldap::NG::Portal constant sub authenticate { - PE_OK; + my $self = shift; + return $ENV{ $self->{SSLVar} } ? PE_OK : PE_ERROR; } ## @method string getDisplayType