Append Custom backend & Improve unit test (#1605)

merge-requests/133/head
Christophe Maudoux 5 years ago
parent 2ba565693b
commit 27b0b7fde4
  1. 2
      lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/ReConstants.pm
  2. 3
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
  3. 4
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm
  4. 6
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Tree.pm
  5. 1
      lemonldap-ng-manager/site/htdocs/static/languages/ar.json
  6. 1
      lemonldap-ng-manager/site/htdocs/static/languages/de.json
  7. 1
      lemonldap-ng-manager/site/htdocs/static/languages/en.json
  8. 1
      lemonldap-ng-manager/site/htdocs/static/languages/fr.json
  9. 1
      lemonldap-ng-manager/site/htdocs/static/languages/it.json
  10. 1
      lemonldap-ng-manager/site/htdocs/static/languages/tr.json
  11. 1
      lemonldap-ng-manager/site/htdocs/static/languages/vi.json
  12. 1
      lemonldap-ng-manager/site/htdocs/static/languages/zh.json
  13. 2
      lemonldap-ng-manager/site/htdocs/static/reverseTree.json
  14. 2
      lemonldap-ng-manager/site/htdocs/static/struct.json
  15. 3
      lemonldap-ng-portal/MANIFEST
  16. 22
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/CertificateResetByMail/Custom.pm
  17. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Register/Custom.pm
  18. 4
      lemonldap-ng-portal/t/44-CertificateResetByMail-Demo.t

@ -38,7 +38,7 @@ our $authParameters = {
casParams => [qw(casAuthnLevel)],
choiceParams => [qw(authChoiceParam authChoiceModules authChoiceAuthBasic)],
combinationParams => [qw(combination combModules)],
customParams => [qw(customAuth customUserDB customPassword customRegister customAddParams)],
customParams => [qw(customAuth customUserDB customPassword customRegister customResetCertByMail customAddParams)],
dbiParams => [qw(dbiAuthnLevel dbiExportedVars dbiAuthChain dbiAuthUser dbiAuthPassword dbiUserChain dbiUserUser dbiUserPassword dbiAuthTable dbiUserTable dbiAuthLoginCol dbiAuthPasswordCol dbiPasswordMailCol userPivot dbiAuthPasswordHash dbiDynamicHashEnabled dbiDynamicHashValidSchemes dbiDynamicHashValidSaltedSchemes dbiDynamicHashNewPasswordScheme)],
demoParams => [qw(demoExportedVars)],
facebookParams => [qw(facebookAuthnLevel facebookExportedVars facebookAppId facebookAppSecret facebookUserField)],

@ -1083,6 +1083,9 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'customRegister' => {
'type' => 'text'
},
'customResetCertByMail' => {
'type' => 'text'
},
'customToTrace' => {
'type' => 'lmAttrOrMacro'
},

@ -3590,6 +3590,10 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
type => 'text',
documentation => 'Custom register module',
},
customResetCertByMail => {
type => 'text',
documentation => 'Custom certificateResetByMail module',
},
customAddParams => {
type => 'keyTextContainer',
documentation => 'Custom additional parameters',

@ -423,9 +423,9 @@ sub tree {
title => 'customParams',
help => 'authcustom.html',
nodes => [
'customAuth', 'customUserDB',
'customPassword', 'customRegister',
'customAddParams',
'customAuth', 'customUserDB',
'customPassword', 'customRegister',
'customResetCertByMail', 'customAddParams',
]
},
],

@ -222,6 +222,7 @@
"customPluginsParams":"معايير إضافية",
"customPortalSkin":"غلاف البوابة مخصص",
"customRegister":"وحدة تسجيل مخصص",
"customResetCertByMail":"Custom certificateResetByMail module",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"وحدة قاعدة البيانات المخصصة",
"date":"تاريخ",

@ -222,6 +222,7 @@
"customPluginsParams":"Additional parameters",
"customPortalSkin":"Custom portal skin",
"customRegister":"Custom register module",
"customResetCertByMail":"Custom certificateResetByMail module",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"Custom user DB module",
"date":"Datum",

@ -222,6 +222,7 @@
"customPluginsParams":"Additional parameters",
"customPortalSkin":"Custom portal skin",
"customRegister":"Custom register module",
"customResetCertByMail":"Custom certificateResetByMail module",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"Custom user DB module",
"date":"Date",

@ -222,6 +222,7 @@
"customPluginsParams":"Paramètres supplémentaires",
"customPortalSkin":"Style personnalisé du portail",
"customRegister":"Module d'enregistrement personnalisé",
"customResetCertByMail":"Module de réinitialisation des certificats personalisé",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"Module BD utilisateurs personnalisé",
"date":"Date",

@ -222,6 +222,7 @@
"customPluginsParams":"Parametri aggiuntivi",
"customPortalSkin":"Personalizza faccia del portale ",
"customRegister":"Personalizza modulo di registro",
"customResetCertByMail":"Custom certificateResetByMail module",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"Personalizza modulo utente DB",
"date":"Data",

@ -222,6 +222,7 @@
"customPluginsParams":"Ek parametreler",
"customPortalSkin":"Özel portal dış görünümü",
"customRegister":"Özelleştirilmiş kayıt modülü",
"customResetCertByMail":"Custom certificateResetByMail module",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"Özelleştirilmiş kullanıcı veri tabanı modülü",
"date":"Tarih",

@ -222,6 +222,7 @@
"customPluginsParams":"Additional parameters",
"customPortalSkin":"Tùy chỉnh giao diện cổng thông tin",
"customRegister":"Module đăng ký tùy chỉnh",
"customResetCertByMail":"Custom certificateResetByMail module",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"Mô đun DB người dùng tùy chỉnh",
"date":"Ngày",

@ -222,6 +222,7 @@
"customPluginsParams":"Additional parameters",
"customPortalSkin":"Custom portal skin",
"customRegister":"Custom register module",
"customResetCertByMail":"Custom certificateResetByMail module",
"customToTrace":"REMOTE_CUSTOM",
"customUserDB":"Custom user DB module",
"date":"日期",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -47,6 +47,8 @@ lib/Lemonldap/NG/Portal/Auth/SSL.pm
lib/Lemonldap/NG/Portal/Auth/Twitter.pm
lib/Lemonldap/NG/Portal/Auth/WebID.pm
lib/Lemonldap/NG/Portal/CDC.pm
lib/Lemonldap/NG/Portal/CertificateResetByMail/Custom.pm
lib/Lemonldap/NG/Portal/CertificateResetByMail/Demo.pm
lib/Lemonldap/NG/Portal/CertificateResetByMail/LDAP.pm
lib/Lemonldap/NG/Portal/Issuer/CAS.pm
lib/Lemonldap/NG/Portal/Issuer/Get.pm
@ -584,6 +586,7 @@ t/43-MailPasswordReset-LDAP.t
t/43-MailPasswordReset-with-captcha.t
t/43-MailPasswordReset-with-token.t
t/43-MailPasswordReset.t
t/44-CertificateResetByMail-Demo.t
t/44-CertificateResetByMail-LDAP.t
t/50-IssuerGet.t
t/57-GlobalLogout-without-Timer.t

@ -0,0 +1,22 @@
package Lemonldap::NG::Portal::CertificateResetByMail::Custom;
use strict;
use Mouse;
extends 'Lemonldap::NG::Portal::Main::Plugin';
sub new {
my ( $class, $self ) = @_;
unless ( $self->{conf}->{customRegister} ) {
die 'Custom register module not defined';
}
my $res = $self->{p}->loadModule( $self->{conf}->{customResetCertByMail} );
unless ($res) {
die 'Unable to load register module ' . $self->{conf}->{customResetCertByMail};
}
return $res;
}
1;

@ -15,6 +15,7 @@ sub new {
unless ($res) {
die 'Unable to load register module ' . $self->{conf}->{customRegister};
}
return $res;
}

@ -37,7 +37,9 @@ use DateTime::Format::RFC3339;';
authentication => 'SSL',
userDB => 'Demo',
passwordDB => 'Demo',
registerDB => 'Demo',
registerDB => 'Custom',
customRegister => '::Register::Demo',
customResetCertByMail => '::CertificateResetByMail::Demo',
captcha_mail_enabled => 0,
portalDisplayCertificateResetByMail => 1,
certificateResetByMailCeaAttribute => 'description',

Loading…
Cancel
Save