From b2e3eb3f07bfc877ee6aee9a3fdd187d7abbf52b Mon Sep 17 00:00:00 2001 From: Devrim Date: Wed, 22 Jun 2022 23:05:25 +0300 Subject: [PATCH] feat: jans-linux-setup add forgot password script (#1587) --- .../jans_setup/setup_app/utils/crypto64.py | 2 +- .../jans_setup/templates/scripts.ldif | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/jans-linux-setup/jans_setup/setup_app/utils/crypto64.py b/jans-linux-setup/jans_setup/setup_app/utils/crypto64.py index 56dda2bd08c..1ddaef8c5bf 100644 --- a/jans-linux-setup/jans_setup/setup_app/utils/crypto64.py +++ b/jans-linux-setup/jans_setup/setup_app/utils/crypto64.py @@ -161,7 +161,7 @@ def prepare_base64_extension_scripts(self, extensions=[]): extension_path = Path(Config.extensionFolder) for ep in extension_path.glob("**/*"): if ep.is_file() and ep.suffix.lower() in ['.py', '.java']: - extension_type = ep.parent.name.lower() + extension_type = ep.relative_to(Config.extensionFolder).parent.as_posix().lower().replace(os.path.sep, '_') extension_name = ep.stem.lower() extension_script_name = '{}_{}'.format(extension_type, extension_name) diff --git a/jans-linux-setup/jans_setup/templates/scripts.ldif b/jans-linux-setup/jans_setup/templates/scripts.ldif index 3260dd92f06..92401a4d94b 100644 --- a/jans-linux-setup/jans_setup/templates/scripts.ldif +++ b/jans-linux-setup/jans_setup/templates/scripts.ldif @@ -546,3 +546,18 @@ jansProgLng: python jansRevision: 1 jansScr::%(person_authentication_agamabridge)s jansScrTyp: person_authentication + +dn: inum=B270-381E,ou=scripts,o=jans +objectClass: jansCustomScr +objectClass: top +description: This script is a 2 in 1. It can be used to enable user to reset its password or to enable 2FA sending a token to user's email +displayName: Forgot Password 2FA Token +inum: B270-381E +jansConfProperty: {"value1":"SCRIPT_FUNCTION","value2":"forgot_password","description":""} +jansEnabled: false +jansLevel: 10 +jansModuleProperty: {"value1":"SCRIPT_FUNCTION","value2":"ldap","description":""} +jansProgLng: python +jansRevision: 1 +jansScr::%(person_authentication_other_forgot_password_forgot_password)s +jansScrTyp: person_authentication