From 828fb103898cb339cde8e363b30ba9e847fc58cb Mon Sep 17 00:00:00 2001 From: Maxime Besson Date: Wed, 25 May 2022 15:59:36 +0200 Subject: [PATCH] Default 2FA token to sfLoginTimeout (#2757) --- .../lib/Lemonldap/NG/Portal/2F/Engines/Default.pm | 3 ++- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm | 1 + .../lib/Lemonldap/NG/Portal/Main/SecondFactor.pm | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm index 24be564c6..a044e577f 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm @@ -41,7 +41,8 @@ has ott => ( default => sub { my $ott = $_[0]->{p}->loadModule('Lemonldap::NG::Portal::Lib::OneTimeToken'); - $ott->timeout( $_[0]->{conf}->{formTimeout} ); + $ott->timeout( $_[0]->{conf}->{sfLoginTimeout} + || $_[0]->{conf}->{formTimeout} ); return $ott; } ); diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm index 8d4cf833c..dff8d95f7 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Mail2F.pm @@ -35,6 +35,7 @@ has ott => ( my $ott = $_[0]->{p}->loadModule('Lemonldap::NG::Portal::Lib::OneTimeToken'); $ott->timeout( $_[0]->{conf}->{mail2fTimeout} + || $_[0]->{conf}->{sfLoginTimeout} || $_[0]->{conf}->{formTimeout} ); return $ott; } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm index 8422a329f..3379011d2 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/SecondFactor.pm @@ -25,7 +25,8 @@ has ott => ( default => sub { my $ott = $_[0]->{p}->loadModule('Lemonldap::NG::Portal::Lib::OneTimeToken'); - $ott->timeout( $_[0]->{conf}->{formTimeout} ); + $ott->timeout( $_[0]->{conf}->{sfLoginTimeout} + || $_[0]->{conf}->{formTimeout} ); return $ott; } );