From 52fa94bd556971e70dd03d2d9fd7ef50c66a30d4 Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Sat, 10 Aug 2019 11:13:56 +0200 Subject: [PATCH] Sort functions & append comments --- .../Lemonldap/NG/Portal/Auth/Combination.pm | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm index a7c859b71..992fa7e6e 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Combination.pm @@ -98,16 +98,14 @@ sub init { # Each first method must call getStack() to get the auth scheme available for # the current user + +## Auth steps +############# sub extractFormInfo { my ( $self, $req ) = @_; return $self->try( 0, 'extractFormInfo', $req ); } -# Note that UserDB::Combination uses the same object. -sub getUser { - return $_[0]->try( 1, 'getUser', $_[1] ); -} - sub authenticate { return $_[0]->try( 0, 'authenticate', $_[1] ); } @@ -116,14 +114,6 @@ sub setAuthSessionInfo { return $_[0]->try( 0, 'setAuthSessionInfo', $_[1] ); } -sub setSessionInfo { - return $_[0]->try( 1, 'setSessionInfo', $_[1] ); -} - -sub setGroups { - return $_[0]->try( 1, 'setGroups', $_[1] ); -} - sub getDisplayType { my ( $self, $req ) = @_; return $self->conf->{combinationForms} @@ -157,6 +147,21 @@ sub authLogout { return $res; } +## UserDB steps +############### +# Note that UserDB::Combination uses the same object. +sub getUser { + return $_[0]->try( 1, 'getUser', $_[1] ); +} + +sub setSessionInfo { + return $_[0]->try( 1, 'setSessionInfo', $_[1] ); +} + +sub setGroups { + return $_[0]->try( 1, 'setGroups', $_[1] ); +} + sub getStack { my ( $self, $req, @steps ) = @_; return $req->data->{combinationStack} @@ -224,7 +229,6 @@ sub name { package Lemonldap::NG::Portal::Lib::Combination::UserLogger; # This logger rewrite "warn" to "notice" - sub new { my ( $class, $realLogger ) = @_; return bless { logger => $realLogger }, $class;