From c34e75d49db89999633249376c7b42c41bb1ce24 Mon Sep 17 00:00:00 2001 From: YuriyZ Date: Thu, 5 May 2022 10:09:46 +0300 Subject: [PATCH] feat(jans-core): remove UPDATE_USER and USER_REGISTRATION scripts #1289 --- .../user/using-jans-cli/cli-custom-scripts.md | 32 +++--- .../using-jans-cli/im/im-custom-scripts.md | 32 +++--- .../as/server/service/AppInitializer.java | 2 - jans-cli/cli/jca.yaml | 4 - .../docs/jans-config-api-swagger.yaml | 4 - .../scripts/custom/generic/all-script.json | 73 ------------ .../model/custom/script/CustomScriptType.java | 7 -- .../script/type/user/DummyUpdateUserType.java | 75 ------------- .../type/user/DummyUserRegistrationType.java | 60 ---------- .../script/type/user/UpdateUserType.java | 35 ------ .../type/user/UserRegistrationType.java | 30 ----- .../extension/update_user/SampleScript.py | 74 ------------ .../ConfirmRegistrationSampleScript.py | 105 ------------------ .../user_registration/SampleScript.py | 75 ------------- .../jans_setup/templates/scripts.ldif | 43 ------- .../scim/service/ConfigurationService.java | 5 +- 16 files changed, 31 insertions(+), 625 deletions(-) delete mode 100644 jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUpdateUserType.java delete mode 100644 jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUserRegistrationType.java delete mode 100644 jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UpdateUserType.java delete mode 100644 jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UserRegistrationType.java delete mode 100644 jans-linux-setup/jans_setup/static/extension/update_user/SampleScript.py delete mode 100644 jans-linux-setup/jans_setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py delete mode 100644 jans-linux-setup/jans_setup/static/extension/user_registration/SampleScript.py diff --git a/docs/user/using-jans-cli/cli-custom-scripts.md b/docs/user/using-jans-cli/cli-custom-scripts.md index 0b7a250bff2..26db4a0b039 100644 --- a/docs/user/using-jans-cli/cli-custom-scripts.md +++ b/docs/user/using-jans-cli/cli-custom-scripts.md @@ -103,11 +103,11 @@ We need to fill some of these properties with valid data to add this new script. ``` { - "name": "custom_script_update_user", + "name": "custom_script_client", "aliases": null, "description": "Testing custom script addition", - "script": "_file /root/update_user.py", - "scriptType": "UPDATE_USER", + "script": "_file /root/client_registration.py", + "scriptType": "CLIENT_REGISTRATION", "programmingLanguage": "PYTHON", "moduleProperties": [{ "value1": "myvalue1", @@ -128,7 +128,7 @@ We can remove `dn`, `inum`. As because these two items are auto generated with r ### Name of the type of scripts ``` -PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, UPDATE_USER, USER_REGISTRATION, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP, UPDATE_TOKEN +PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP, UPDATE_TOKEN ``` ### Programming Language @@ -147,11 +147,11 @@ Server Response: { "dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans", "inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7", - "name": "custom_script_update_user", + "name": "custom_script_client", "aliases": null, "description": "Testing custom script addition", "script": "...", - "scriptType": "UPDATE_USER", + "scriptType": "CLIENT_REGISTRATION", "programmingLanguage": "PYTHON", "moduleProperties": [ { @@ -186,11 +186,11 @@ As we created a custom script in the [above](cli-custom-scripts.md#adds-a-new-cu { "dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans", "inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7", - "name": "custom_script_update_user", + "name": "custom_script_client", "aliases": null, "description": "Testing custom script addition", - "script": "_file /root/update_user.py", - "scriptType": "UPDATE_USER", + "script": "_file /root/client_registrationj.py", + "scriptType": "CLIENT_REGISTRATION", "programmingLanguage": "PYTHON", "moduleProperties": [{ "value1": "myvalue1", @@ -224,11 +224,11 @@ Server Response: { "dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans", "inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7", - "name": "custom_script_update_user", + "name": "custom_script_client", "aliases": null, "description": "Testing custom script addition", "script": "...", - "scriptType": "UPDATE_USER", + "scriptType": "CLIENT_REGISTRATION", "programmingLanguage": "PYTHON", "moduleProperties": [ { @@ -269,13 +269,13 @@ The command line is: /opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-type --url-suffix type:script-type-name ``` -For an example, let's find all the scripts of `UPDATE_USER` type. So, the command line is: +For an example, let's find all the scripts of `CLIENT_REGISTRATION` type. So, the command line is: ``` -/opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-type --url-suffix type:UPDATE_USER +/opt/jans/jans-cli/config-cli.py --operation-id get-config-scripts-by-type --url-suffix type:CLIENT_REGISTRATION ``` -It returns all the custom scripts that are related to the `UPDATE_USER` type available in the Janssen Server. You will find the name of all the types [here](cli-custom-scripts.md#name-of-the-type-of-scripts) +It returns all the custom scripts that are related to the `CLIENT_REGISTRATION` type available in the Janssen Server. You will find the name of all the types [here](cli-custom-scripts.md#name-of-the-type-of-scripts) ## Get Custom Scripts by it's `inum` @@ -309,11 +309,11 @@ Getting access token for scope https://jans.io/oauth/config/scripts.readonly { "dn": "inum=61aef81b-b22d-42c0-89d5-b098c976a2b7,ou=scripts,o=jans", "inum": "61aef81b-b22d-42c0-89d5-b098c976a2b7", - "name": "custom_script_update_user", + "name": "custom_script_client", "aliases": null, "description": "Testing custom script addition", "script": "...", - "scriptType": "UPDATE_USER", + "scriptType": "CLIENT_REGISTRATION", "programmingLanguage": "PYTHON", "moduleProperties": [ { diff --git a/docs/user/using-jans-cli/im/im-custom-scripts.md b/docs/user/using-jans-cli/im/im-custom-scripts.md index c0736fb9598..afab8927409 100644 --- a/docs/user/using-jans-cli/im/im-custom-scripts.md +++ b/docs/user/using-jans-cli/im/im-custom-scripts.md @@ -70,35 +70,29 @@ Getting access token for scope https://jans.io/oauth/config/scripts.readonly +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ | 22 | PERSON_AUTHENTICATION | uaf | False | 5018-AF9C | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 23 | USER_REGISTRATION | user_registration | False | 6EA0-8F0C | +| 23 | UMA_RPT_POLICY | scim_access_policy | False | 2DAF-F9A5 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 24 | UMA_RPT_POLICY | scim_access_policy | False | 2DAF-F9A5 | +| 24 | UMA_RPT_POLICY | uma_rpt_policy | False | 2DAF-F995 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 25 | UMA_RPT_POLICY | uma_rpt_policy | False | 2DAF-F995 | +| 25 | DYNAMIC_SCOPE | org_name | False | 031C-5621 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 26 | DYNAMIC_SCOPE | org_name | False | 031C-5621 | +| 26 | PERSISTENCE_EXTENSION | persistence_extension | False | 8AF7.D82A | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 27 | PERSISTENCE_EXTENSION | persistence_extension | False | 8AF7.D82A | +| 27 | ID_GENERATOR | id_generator | False | 031C-4A65 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 28 | ID_GENERATOR | id_generator | False | 031C-4A65 | +| 28 | IDP | idp | False | 8AF7.D82B | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 29 | IDP | idp | False | 8AF7.D82B | +| 29 | CACHE_REFRESH | cache_refresh | False | 13D3-E7AD | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 30 | CACHE_REFRESH | cache_refresh | False | 13D3-E7AD | +| 30 | APPLICATION_SESSION | application_session | False | DAA9-B789 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 31 | APPLICATION_SESSION | application_session | False | DAA9-B789 | +| 31 | DYNAMIC_SCOPE | dynamic_permission | True | CB5B-3211 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 32 | DYNAMIC_SCOPE | dynamic_permission | True | CB5B-3211 | +| 32 | SCIM | scim_event_handler | False | A910-56AB | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 33 | SCIM | scim_event_handler | False | A910-56AB | +| 33 | CLIENT_REGISTRATION | client_registration | False | DAA9-B788 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 34 | CLIENT_REGISTRATION | client_registration | False | DAA9-B788 | -+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 35 | DYNAMIC_SCOPE | work_phone | False | 031C-5622 | -+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 36 | USER_REGISTRATION | user_confirm_registration | False | 6EA0-8F0D | -+----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ -| 37 | UPDATE_USER | update_user | False | 522F-CDC5 | +| 34 | DYNAMIC_SCOPE | work_phone | False | 031C-5622 | +----+-------------------------------------+-----------------------------------------------------------+-----------+-----------+ @@ -110,7 +104,7 @@ To add a new script, choose option 2 and fill each property: `dn, inum, display name, valid script` ``` -ScriptType: [PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, UPDATE_USER, USER_REGISTRATION, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP] +ScriptType: [PERSON_AUTHENTICATION, INTROSPECTION, RESOURCE_OWNER_PASSWORD_CREDENTIALS, APPLICATION_SESSION, CACHE_REFRESH, CLIENT_REGISTRATION, ID_GENERATOR, UMA_RPT_POLICY, UMA_RPT_CLAIMS, UMA_CLAIMS_GATHERING, CONSENT_GATHERING, DYNAMIC_SCOPE, SPONTANEOUS_SCOPE, END_SESSION, POST_AUTHN, SCIM, CIBA_END_USER_NOTIFICATION, PERSISTENCE_EXTENSION, IDP] Programming Language: [PYTHON, JAVA] ``` diff --git a/jans-auth-server/server/src/main/java/io/jans/as/server/service/AppInitializer.java b/jans-auth-server/server/src/main/java/io/jans/as/server/service/AppInitializer.java index 35d04909138..fe45cbccf28 100644 --- a/jans-auth-server/server/src/main/java/io/jans/as/server/service/AppInitializer.java +++ b/jans-auth-server/server/src/main/java/io/jans/as/server/service/AppInitializer.java @@ -216,8 +216,6 @@ public void applicationInitialized(@Observes @Initialized(ApplicationScoped.clas List supportedCustomScriptTypes = Lists.newArrayList(CustomScriptType.values()); supportedCustomScriptTypes.remove(CustomScriptType.CACHE_REFRESH); - supportedCustomScriptTypes.remove(CustomScriptType.UPDATE_USER); - supportedCustomScriptTypes.remove(CustomScriptType.USER_REGISTRATION); supportedCustomScriptTypes.remove(CustomScriptType.SCIM); supportedCustomScriptTypes.remove(CustomScriptType.IDP); supportedCustomScriptTypes.remove(CustomScriptType.CONFIG_API); diff --git a/jans-cli/cli/jca.yaml b/jans-cli/cli/jca.yaml index a1563ab5bae..7a1bf97f4e6 100644 --- a/jans-cli/cli/jca.yaml +++ b/jans-cli/cli/jca.yaml @@ -995,8 +995,6 @@ paths: - '- resource_owner_password_credentials' - '- application_session' - '- cache_refresh' - - '- update_user' - - '- user_registration' - '- client_registration' - '- id_generator' - '- uma_rpt_policy' @@ -3404,8 +3402,6 @@ components: - RESOURCE_OWNER_PASSWORD_CREDENTIALS - APPLICATION_SESSION - CACHE_REFRESH - - UPDATE_USER - - USER_REGISTRATION - CLIENT_REGISTRATION - ID_GENERATOR - UMA_RPT_POLICY diff --git a/jans-config-api/docs/jans-config-api-swagger.yaml b/jans-config-api/docs/jans-config-api-swagger.yaml index a1563ab5bae..7a1bf97f4e6 100644 --- a/jans-config-api/docs/jans-config-api-swagger.yaml +++ b/jans-config-api/docs/jans-config-api-swagger.yaml @@ -995,8 +995,6 @@ paths: - '- resource_owner_password_credentials' - '- application_session' - '- cache_refresh' - - '- update_user' - - '- user_registration' - '- client_registration' - '- id_generator' - '- uma_rpt_policy' @@ -3404,8 +3402,6 @@ components: - RESOURCE_OWNER_PASSWORD_CREDENTIALS - APPLICATION_SESSION - CACHE_REFRESH - - UPDATE_USER - - USER_REGISTRATION - CLIENT_REGISTRATION - ID_GENERATOR - UMA_RPT_POLICY diff --git a/jans-config-api/server/src/test/resources/feature/config/scripts/custom/generic/all-script.json b/jans-config-api/server/src/test/resources/feature/config/scripts/custom/generic/all-script.json index abac1c5347d..c3cf5e2763c 100644 --- a/jans-config-api/server/src/test/resources/feature/config/scripts/custom/generic/all-script.json +++ b/jans-config-api/server/src/test/resources/feature/config/scripts/custom/generic/all-script.json @@ -900,35 +900,6 @@ ], "baseDn": "inum=5018-AF9C,ou=scripts,o=gluu" }, - { - "internal": false, - "level": 90, - "programmingLanguage": "PYTHON", - "description": "Sample User Registration script", - "locationType": "LDAP", - "dn": "inum=6EA0-8F0C,ou=scripts,o=gluu", - "inum": "6EA0-8F0C", - "script": "# jans-auth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.\r\n# Copyright (c) 2016, Gluu\r\n#\r\n# Author: Yuriy Movchan\r\n#\r\n\r\nfrom org.gluu.model.custom.script.type.user import UserRegistrationType\r\nfrom org.gluu.util import StringHelper, ArrayHelper\r\nfrom java.util import Arrays, ArrayList\r\n\r\nimport java\r\n\r\nclass UserRegistration(UserRegistrationType):\r\n def __init__(self, currentTimeMillis):\r\n self.currentTimeMillis = currentTimeMillis\r\n\r\n def init(self, customScript, configurationAttributes):\r\n print \"User registration. Initialization\"\r\n\r\n self.enable_user = StringHelper.toBoolean(configurationAttributes.get(\"enable_user\").getValue2(), False)\r\n\r\n print \"User registration. Initialized successfully\"\r\n\r\n return True \r\n\r\n def destroy(self, configurationAttributes):\r\n print \"User registration. Destroy\"\r\n print \"User registration. Destroyed successfully\"\r\n return True \r\n\r\n # User registration init method\r\n # user is org.gluu.oxtrust.model.GluuCustomPerson\r\n # requestParameters is java.util.Map\r\n # configurationAttributes is java.util.Map\r\n def initRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User registration. Init method\"\r\n\r\n return True\r\n\r\n # User registration pre method\r\n # user is org.gluu.oxtrust.model.GluuCustomPerson\r\n # requestParameters is java.util.Map\r\n # configurationAttributes is java.util.Map\r\n def preRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User registration. Pre method\"\r\n\r\n userStatus = \"active\"\r\n if not self.enable_user:\r\n userStatus = \"inactive\"\r\n\r\n # Disable/Enable registered user\r\n user.setStatus(userStatus)\r\n\r\n return True\r\n\r\n # User registration post method\r\n # user is org.gluu.oxtrust.model.GluuCustomPerson\r\n # requestParameters is java.util.Map\r\n # configurationAttributes is java.util.Map\r\n def postRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User registration. Post method\"\r\n\r\n return True\r\n \r\n # User confirm New Registration method\r\n # user is org.gluu.oxtrust.model.GluuCustomPerson\r\n # requestParameters is java.util.Map\r\n # configurationAttributes is java.util.Map\r\n def confirmRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User registration. Confirm registration method\"\r\n\r\n return True\r\n\r\n def getApiVersion(self):\r\n return 11\r\n", - "enabled": false, - "revision": 1, - "moduleProperties": [ - { - "value2": "ldap", - "value1": "location_type" - } - ], - "scriptType": "USER_REGISTRATION", - "name": "user_registration", - "modified": false, - "configurationProperties": [ - { - "hide": false, - "value2": "false", - "value1": "enable_user" - } - ], - "baseDn": "inum=6EA0-8F0C,ou=scripts,o=gluu" - }, { "internal": false, "level": 100, @@ -1224,28 +1195,6 @@ ], "baseDn": "inum=DAA9-B788,ou=scripts,o=gluu" }, - { - "internal": false, - "level": 100, - "programmingLanguage": "PYTHON", - "description": "Sample Update User script", - "locationType": "LDAP", - "dn": "inum=522F-CDC5,ou=scripts,o=gluu", - "inum": "522F-CDC5", - "script": "# jans-auth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.\n# Copyright (c) 2016, Gluu\n#\n# Author: Yuriy Movchan\n#\n\nfrom org.gluu.model.custom.script.type.user import UpdateUserType\nfrom org.gluu.util import StringHelper, ArrayHelper\nfrom java.util import Arrays, ArrayList\n\nimport java\n\nclass UpdateUser(UpdateUserType):\n def __init__(self, currentTimeMillis):\n self.currentTimeMillis = currentTimeMillis\n\n def init(self, customScript, configurationAttributes):\n print \"Update user. Initialization\"\n print \"Update user. Initialized successfully\"\n\n return True \n\n def destroy(self, configurationAttributes):\n print \"Update user. Destroy\"\n print \"Update user. Destroyed successfully\"\n return True \n\n def getApiVersion(self):\n return 11\n\n def newUser(self, user, configurationAttributes):\n print \"Update user. newUser method\"\n\n return True\n\n def addUser(self, user, persisted, configurationAttributes):\n print \"Update user. addUser method\"\n\n return True\n\n def postAddUser(self, user, configurationAttributes):\n print \"Update user. postAddUser method\"\n\n return True\n\n # Update user entry before persistent it\n # user is org.gluu.oxtrust.model.GluuCustomPerson\n # persisted is boolean value to specify if operation type: add/modify\n # configurationAttributes is java.util.Map\n def updateUser(self, user, persisted, configurationAttributes):\n print \"Update user. updateUser method\"\n\n uid = user.getUid()\n print \"Update user. User uid: {}\".format(uid)\n \n mail = uid + \"@example.org\"\n user.setMail(mail)\n\n return True\n\n def postUpdateUser(self, user, configurationAttributes):\n print \"Update user. postUpdateUser method\"\n\n return True\n\n def deleteUser(self, user, persisted, configurationAttributes):\n print \"Update user. deleteUser method\"\n\n return True\n\n def postDeleteUser(self, user, configurationAttributes):\n print \"Update user. postDeleteUser method\"\n\n return True\n", - "enabled": false, - "revision": 1, - "moduleProperties": [ - { - "value2": "ldap", - "value1": "location_type" - } - ], - "scriptType": "UPDATE_USER", - "name": "update_user", - "modified": false, - "baseDn": "inum=522F-CDC5,ou=scripts,o=gluu" - }, { "internal": false, "level": 100, @@ -1296,27 +1245,5 @@ } ], "baseDn": "inum=2DAF-F995,ou=scripts,o=gluu" - }, - { - "internal": false, - "level": 100, - "programmingLanguage": "PYTHON", - "description": "Sample Confirm User Registration script", - "locationType": "LDAP", - "dn": "inum=6EA0-8F0D,ou=scripts,o=gluu", - "inum": "6EA0-8F0D", - "script": "# jans-auth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.\r\n# Copyright (c) 2016, Gluu\r\n#\r\n\r\nfrom org.gluu.service.cdi.util import CdiUtil\r\nfrom org.gluu.model.custom.script.type.user import UserRegistrationType\r\nfrom org.gluu.service import MailService\r\nfrom org.gluu.oxtrust.service import PersonService\r\nfrom org.gluu.util import StringHelper, ArrayHelper\r\nfrom java.util import Arrays, ArrayList\r\nfrom org.gluu.config.oxtrust import AppConfiguration\r\nfrom javax.faces.context import ExternalContext\r\nfrom org.gluu.oxtrust.service import ConfigurationService\r\n\r\nimport java\r\n\r\nclass UserRegistration(UserRegistrationType):\r\n def __init__(self, currentTimeMillis):\r\n self.currentTimeMillis = currentTimeMillis\r\n\r\n def init(self, customScript, configurationAttributes):\r\n print \"User Confirm registration. Initialization\"\r\n print \"User Confirm registration. Initialized successfully\"\r\n\r\n return True \r\n\r\n def destroy(self, configurationAttributes):\r\n print \"User Confirm registration. Destroy\"\r\n print \"User Confirm registration. Destroyed successfully\"\r\n return True \r\n\r\n # User registration init method\r\n # user is org.gluu.oxtrust.model.GluuCustomPerson\r\n # requestParameters is java.util.Map\r\n # configurationAttributes is java.util.Map\r\n def initRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User Confirm registration. Init method\"\r\n #hostName = requestParameters.get(\"hostName\")[0]\r\n #print \"HostName Initialization : %s\" % hostName\r\n return True\r\n\r\n # User registration pre method\r\n # user is org.gluu.oxtrust.model.GluuCustomPerson\r\n # requestParameters is java.util.Map\r\n # configurationAttributes is java.util.Map\r\n def preRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User Confirm registration. Pre method\"\r\n userStatus = \"inactive\"\r\n\r\n # Disable/Enable registered user\r\n user.setStatus(userStatus)\r\n self.guid = StringHelper.getRandomString(16)\r\n user.setGuid(self.guid)\r\n return True\r\n\r\n # User registration post method\r\n # user is org.gluu.oxtrust.model.GluuCustomPerson\r\n # requestParameters is java.util.Map\r\n # configurationAttributes is java.util.Map\r\n def postRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User Confirm registration. Post method\"\r\n externalContext = CdiUtil.bean(ExternalContext)\r\n contextPath = externalContext.getRequest().getContextPath()\r\n hostName = externalContext.getRequestServerName()\r\n print \"HostName from context : %s\" % hostName\r\n mailService = CdiUtil.bean(MailService)\r\n subject = \"Registration confirmation\"\r\n activationLink = \"https://%s%s/confirm/registration.htm?code=%s\" %(hostName, contextPath, self.guid)\r\n body = \"

Welcome


Dear %s,

Your Account has been created, welcome to %s.

You are just one step way from activating your account on %s.

Click the button and start using your account.

\" % (user.getUid(), hostName, hostName, activationLink)\r\n print \"User Confirm registration. Post method. Attempting to send e-mail to '%s' message '%s'\" % (user.getMail(), body)\r\n mailService.sendMail(user.getMail(), None, subject, body, body);\r\n return True\r\n\r\n def confirmRegistration(self, user, requestParameters, configurationAttributes):\r\n print \"User Confirm registration. Confirm method\"\r\n code_array = requestParameters.get(\"code\")\r\n if ArrayHelper.isEmpty(code_array):\r\n print \"User Confirm registration. Confirm method. code is empty\"\r\n return False\r\n\r\n confirmation_code = code_array[0]\r\n print \"User Confirm registration. Confirm method. code: '%s'\" % confirmation_code\r\n\r\n if confirmation_code == None:\r\n print \"User Confirm registration. Confirm method. Confirmation code not exist in request\"\r\n return False\r\n\r\n personService = CdiUtil.bean(PersonService)\r\n user = personService.getPersonByAttribute(\"oxGuid\", confirmation_code)\r\n if user == None:\r\n print \"User Confirm registration. Confirm method. There is no user by confirmation code: '%s'\" % confirmation_code\r\n return False\r\n\r\n if confirmation_code == user.getGuid():\r\n user.setStatus(\"active\")\r\n user.setGuid(\"\")\r\n personService.updatePerson(user)\r\n print \"User Confirm registration. Confirm method. User '%s' confirmed his registration\" % user.getUid()\r\n return True\r\n\r\n print \"User Confirm registration. Confirm method. Confirmation code for user '%s' is invalid\" % user.getUid()\r\n return False\r\n\r\n def getApiVersion(self):\r\n return 11\r\n", - "enabled": false, - "revision": 1, - "moduleProperties": [ - { - "value2": "ldap", - "value1": "location_type" - } - ], - "scriptType": "USER_REGISTRATION", - "name": "user_confirm_registration", - "modified": false, - "baseDn": "inum=6EA0-8F0D,ou=scripts,o=gluu" } ] \ No newline at end of file diff --git a/jans-core/script/src/main/java/io/jans/model/custom/script/CustomScriptType.java b/jans-core/script/src/main/java/io/jans/model/custom/script/CustomScriptType.java index 8f53b61e600..883f9dad731 100644 --- a/jans-core/script/src/main/java/io/jans/model/custom/script/CustomScriptType.java +++ b/jans-core/script/src/main/java/io/jans/model/custom/script/CustomScriptType.java @@ -58,10 +58,6 @@ import io.jans.model.custom.script.type.uma.UmaRptPolicyType; import io.jans.model.custom.script.type.user.CacheRefreshType; import io.jans.model.custom.script.type.user.DummyCacheRefreshType; -import io.jans.model.custom.script.type.user.DummyUpdateUserType; -import io.jans.model.custom.script.type.user.DummyUserRegistrationType; -import io.jans.model.custom.script.type.user.UpdateUserType; -import io.jans.model.custom.script.type.user.UserRegistrationType; import io.jans.orm.annotation.AttributeEnum; /** @@ -79,9 +75,6 @@ public enum CustomScriptType implements AttributeEnum { new DummyApplicationSessionType()), CACHE_REFRESH("cache_refresh", "Cache Refresh", CacheRefreshType.class, CustomScript.class, "CacheRefresh", new DummyCacheRefreshType()), - UPDATE_USER("update_user", "Update User", UpdateUserType.class, CustomScript.class, "UpdateUser", new DummyUpdateUserType()), - USER_REGISTRATION("user_registration", "User Registration", UserRegistrationType.class, CustomScript.class, "UserRegistration", - new DummyUserRegistrationType()), CLIENT_REGISTRATION("client_registration", "Client Registration", ClientRegistrationType.class, CustomScript.class, "ClientRegistration", new DummyClientRegistrationType()), ID_GENERATOR("id_generator", "Id Generator", IdGeneratorType.class, CustomScript.class, "IdGenerator", diff --git a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUpdateUserType.java b/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUpdateUserType.java deleted file mode 100644 index 909ce4552df..00000000000 --- a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUpdateUserType.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.model.custom.script.type.user; - -import java.util.Map; - -import io.jans.model.SimpleCustomProperty; -import io.jans.model.custom.script.model.CustomScript; - -/** - * Dummy implementation of interface UpdateUserType - * - * @author Yuriy Movchan Date: 12/30/2014 - * - */ -public class DummyUpdateUserType implements UpdateUserType { - - @Override - public boolean init(Map configurationAttributes) { - return true; - } - @Override - public boolean init(CustomScript customScript, Map configurationAttributes) { - return true; - } - @Override - public boolean destroy(Map configurationAttributes) { - return true; - } - - @Override - public int getApiVersion() { - return 1; - } - - @Override - public boolean newUser(Object user, Map configurationAttributes) { - return true; - } - - @Override - public boolean postUpdateUser(Object user, Map configurationAttributes) { - return true; - } - - @Override - public boolean updateUser(Object user, boolean persisted, Map configurationAttributes) { - return true; - } - - @Override - public boolean addUser(Object user, boolean persisted, Map configurationAttributes) { - return true; - } - - @Override - public boolean postAddUser(Object user, Map configurationAttributes) { - return true; - } - - @Override - public boolean deleteUser(Object user, boolean persisted, Map configurationAttributes) { - return true; - } - - @Override - public boolean postDeleteUser(Object user, Map configurationAttributes) { - return true; - } - -} diff --git a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUserRegistrationType.java b/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUserRegistrationType.java deleted file mode 100644 index 8f106231684..00000000000 --- a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/DummyUserRegistrationType.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.model.custom.script.type.user; - -import java.util.Map; - -import io.jans.model.SimpleCustomProperty; -import io.jans.model.custom.script.model.CustomScript; - -/** - * Dummy implementation of interface UserRegistrationType - * - * @author Yuriy Movchan Date: 01/16/2015 - */ -public class DummyUserRegistrationType implements UserRegistrationType { - - @Override - public boolean init(Map configurationAttributes) { - return true; - } - @Override - public boolean init(CustomScript customScript, Map configurationAttributes) { - return true; - } - @Override - public boolean destroy(Map configurationAttributes) { - return true; - } - - @Override - public int getApiVersion() { - return 1; - } - - @Override - public boolean initRegistration(Object user, Map requestParameters, Map configurationAttributes) { - return false; - } - - @Override - public boolean preRegistration(Object user, Map requestParameters, Map configurationAttributes) { - return false; - } - - @Override - public boolean postRegistration(Object user, Map requestParameters, Map configurationAttributes) { - return false; - } - - @Override - public boolean confirmRegistration(Object user, Map requestParameters, - Map configurationAttributes) { - return false; - } - -} diff --git a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UpdateUserType.java b/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UpdateUserType.java deleted file mode 100644 index e77d18ae032..00000000000 --- a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UpdateUserType.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.model.custom.script.type.user; - -import java.util.Map; - -import io.jans.model.SimpleCustomProperty; -import io.jans.model.custom.script.type.BaseExternalType; - -/** - * Base interface for external update user python script - * - * @author Yuriy Movchan Date: 12/30/2012 - */ -public interface UpdateUserType extends BaseExternalType { - - boolean newUser(Object user, Map configurationAttributes); - - boolean updateUser(Object user, boolean persisted, Map configurationAttributes); - - boolean postUpdateUser(Object user, Map configurationAttributes); - - boolean addUser(Object user, boolean persisted, Map configurationAttributes); - - boolean postAddUser(Object user, Map configurationAttributes); - - boolean deleteUser(Object user, boolean persisted, Map configurationAttributes); - - boolean postDeleteUser(Object user, Map configurationAttributes); - -} diff --git a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UserRegistrationType.java b/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UserRegistrationType.java deleted file mode 100644 index 983d05aa678..00000000000 --- a/jans-core/script/src/main/java/io/jans/model/custom/script/type/user/UserRegistrationType.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Janssen Project software is available under the Apache License (2004). See http://www.apache.org/licenses/ for full text. - * - * Copyright (c) 2020, Janssen Project - */ - -package io.jans.model.custom.script.type.user; - -import java.util.Map; - -import io.jans.model.SimpleCustomProperty; -import io.jans.model.custom.script.type.BaseExternalType; - -/** - * Base interface for external user registration python script - * - * @author Yuriy Movchan Date: 01/16/2015 - */ -public interface UserRegistrationType extends BaseExternalType { - - boolean initRegistration(Object user, Map requestParameters, Map configurationAttributes); - - boolean preRegistration(Object user, Map requestParameters, Map configurationAttributes); - - boolean postRegistration(Object user, Map requestParameters, Map configurationAttributes); - - boolean confirmRegistration(Object user, Map requestParameters, - Map configurationAttributes); - -} diff --git a/jans-linux-setup/jans_setup/static/extension/update_user/SampleScript.py b/jans-linux-setup/jans_setup/static/extension/update_user/SampleScript.py deleted file mode 100644 index d9199f9fa43..00000000000 --- a/jans-linux-setup/jans_setup/static/extension/update_user/SampleScript.py +++ /dev/null @@ -1,74 +0,0 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Yuriy Movchan -# - -from io.jans.model.custom.script.type.user import UpdateUserType -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList - -import java - -class UpdateUser(UpdateUserType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "Update user. Initialization" - print "Update user. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "Update user. Destroy" - print "Update user. Destroyed successfully" - return True - - def getApiVersion(self): - return 11 - - def newUser(self, user, configurationAttributes): - print "Update user. newUser method" - - return True - - def addUser(self, user, persisted, configurationAttributes): - print "Update user. addUser method" - - return True - - def postAddUser(self, user, configurationAttributes): - print "Update user. postAddUser method" - - return True - - # Update user entry before persistent it - # user is io.jans.oxtrust.model.JanssenCustomPerson - # persisted is boolean value to specify if operation type: add/modify - # configurationAttributes is java.util.Map - def updateUser(self, user, persisted, configurationAttributes): - print "Update user. updateUser method" - - uid = user.getUid() - print "Update user. User uid: {}".format(uid) - - mail = uid + "@example.org" - user.setMail(mail) - - return True - - def postUpdateUser(self, user, configurationAttributes): - print "Update user. postUpdateUser method" - - return True - - def deleteUser(self, user, persisted, configurationAttributes): - print "Update user. deleteUser method" - - return True - - def postDeleteUser(self, user, configurationAttributes): - print "Update user. postDeleteUser method" - - return True diff --git a/jans-linux-setup/jans_setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py b/jans-linux-setup/jans_setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py deleted file mode 100644 index 43134633c57..00000000000 --- a/jans-linux-setup/jans_setup/static/extension/user_registration/ConfirmRegistrationSampleScript.py +++ /dev/null @@ -1,105 +0,0 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# - -from io.jans.service.cdi.util import CdiUtil -from io.jans.model.custom.script.type.user import UserRegistrationType -from io.jans.service import MailService -from io.jans.oxtrust.service import PersonService -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList -from io.jans.config.oxtrust import AppConfiguration -from jakarta.faces.context import ExternalContext -from io.jans.oxtrust.service import ConfigurationService - -import java - -class UserRegistration(UserRegistrationType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "User Confirm registration. Initialization" - print "User Confirm registration. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "User Confirm registration. Destroy" - print "User Confirm registration. Destroyed successfully" - return True - - # User registration init method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def initRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Init method" - #hostName = requestParameters.get("hostName")[0] - #print "HostName Initialization : %s" % hostName - return True - - # User registration pre method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def preRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Pre method" - userStatus = "inactive" - - # Disable/Enable registered user - user.setStatus(userStatus) - self.guid = StringHelper.getRandomString(16) - user.setGuid(self.guid) - return True - - # User registration post method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def postRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Post method" - externalContext = CdiUtil.bean(ExternalContext) - contextPath = externalContext.getRequest().getContextPath() - hostName = externalContext.getRequestServerName() - print "HostName from context : %s" % hostName - mailService = CdiUtil.bean(MailService) - subject = "Registration confirmation" - activationLink = "https://%s%s/confirm/registration.htm?code=%s" %(hostName, contextPath, self.guid) - body = "

Welcome


Dear %s,

Your Account has been created, welcome to %s.

You are just one step way from activating your account on %s.

Click the button and start using your account.

" % (user.getUid(), hostName, hostName, activationLink) - print "User Confirm registration. Post method. Attempting to send e-mail to '%s' message '%s'" % (user.getMail(), body) - mailService.sendMail(user.getMail(), None, subject, body, body); - return True - - def confirmRegistration(self, user, requestParameters, configurationAttributes): - print "User Confirm registration. Confirm method" - code_array = requestParameters.get("code") - if ArrayHelper.isEmpty(code_array): - print "User Confirm registration. Confirm method. code is empty" - return False - - confirmation_code = code_array[0] - print "User Confirm registration. Confirm method. code: '%s'" % confirmation_code - - if confirmation_code == None: - print "User Confirm registration. Confirm method. Confirmation code not exist in request" - return False - - personService = CdiUtil.bean(PersonService) - user = personService.getPersonByAttribute("oxGuid", confirmation_code) - if user == None: - print "User Confirm registration. Confirm method. There is no user by confirmation code: '%s'" % confirmation_code - return False - - if confirmation_code == user.getGuid(): - user.setStatus("active") - user.setGuid("") - personService.updatePerson(user) - print "User Confirm registration. Confirm method. User '%s' confirmed his registration" % user.getUid() - return True - - print "User Confirm registration. Confirm method. Confirmation code for user '%s' is invalid" % user.getUid() - return False - - def getApiVersion(self): - return 11 diff --git a/jans-linux-setup/jans_setup/static/extension/user_registration/SampleScript.py b/jans-linux-setup/jans_setup/static/extension/user_registration/SampleScript.py deleted file mode 100644 index 0b2adaa6013..00000000000 --- a/jans-linux-setup/jans_setup/static/extension/user_registration/SampleScript.py +++ /dev/null @@ -1,75 +0,0 @@ -# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. -# Copyright (c) 2016, Janssen -# -# Author: Yuriy Movchan -# - -from io.jans.model.custom.script.type.user import UserRegistrationType -from io.jans.util import StringHelper, ArrayHelper -from java.util import Arrays, ArrayList - -import java - -class UserRegistration(UserRegistrationType): - def __init__(self, currentTimeMillis): - self.currentTimeMillis = currentTimeMillis - - def init(self, customScript, configurationAttributes): - print "User registration. Initialization" - - self.enable_user = StringHelper.toBoolean(configurationAttributes.get("enable_user").getValue2(), False) - - print "User registration. Initialized successfully" - - return True - - def destroy(self, configurationAttributes): - print "User registration. Destroy" - print "User registration. Destroyed successfully" - return True - - # User registration init method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def initRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Init method" - - return True - - # User registration pre method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def preRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Pre method" - - userStatus = "active" - if not self.enable_user: - userStatus = "inactive" - - # Disable/Enable registered user - user.setStatus(userStatus) - - return True - - # User registration post method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def postRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Post method" - - return True - - # User confirm New Registration method - # user is io.jans.oxtrust.model.JanssenCustomPerson - # requestParameters is java.util.Map - # configurationAttributes is java.util.Map - def confirmRegistration(self, user, requestParameters, configurationAttributes): - print "User registration. Confirm registration method" - - return True - - def getApiVersion(self): - return 11 diff --git a/jans-linux-setup/jans_setup/templates/scripts.ldif b/jans-linux-setup/jans_setup/templates/scripts.ldif index fb030c9ddeb..eb8ede16839 100644 --- a/jans-linux-setup/jans_setup/templates/scripts.ldif +++ b/jans-linux-setup/jans_setup/templates/scripts.ldif @@ -279,49 +279,6 @@ objectClass: jansCustomScr jansEnabled: false jansProgLng: python -dn: inum=522F-CDC5,ou=scripts,o=jans -description: Sample Update User script -displayName: update_user -inum: 522F-CDC5 -jansLevel: 100 -jansModuleProperty: {"value1":"location_type","value2":"ldap","description":""} -jansRevision: 1 -jansScr::%(update_user_samplescript)s -jansScrTyp: update_user -objectClass: top -objectClass: jansCustomScr -jansEnabled: false -jansProgLng: python - -dn: inum=6EA0-8F0C,ou=scripts,o=jans -description: Sample User Registration script -displayName: user_registration -inum: 6EA0-8F0C -jansConfProperty: {"value1":"enable_user","value2":"false","description":""} -jansLevel: 90 -jansModuleProperty: {"value1":"location_type","value2":"ldap","description":""} -jansRevision: 1 -jansScr::%(user_registration_samplescript)s -jansScrTyp: user_registration -objectClass: top -objectClass: jansCustomScr -jansEnabled: false -jansProgLng: python - -dn: inum=6EA0-8F0D,ou=scripts,o=jans -description: Sample Confirm User Registration script -displayName: user_confirm_registration -inum: 6EA0-8F0D -jansLevel: 100 -jansModuleProperty: {"value1":"location_type","value2":"ldap","description":""} -jansRevision: 1 -jansScr::%(user_registration_confirmregistrationsamplescript)s -jansScrTyp: user_registration -objectClass: top -objectClass: jansCustomScr -jansEnabled: false -jansProgLng: python - dn: inum=8BAF-80D7,ou=scripts,o=jans description: Fido2 authentication module displayName: fido2 diff --git a/jans-scim/service/src/main/java/io/jans/scim/service/ConfigurationService.java b/jans-scim/service/src/main/java/io/jans/scim/service/ConfigurationService.java index 8f3adb925bf..bc93b47444d 100644 --- a/jans-scim/service/src/main/java/io/jans/scim/service/ConfigurationService.java +++ b/jans-scim/service/src/main/java/io/jans/scim/service/ConfigurationService.java @@ -194,7 +194,7 @@ public ScriptLocationType[] getLocationTypes() { public CustomScriptType[] getCustomScriptTypes() { return new CustomScriptType[] { CustomScriptType.PERSON_AUTHENTICATION, CustomScriptType.CONSENT_GATHERING, - CustomScriptType.UPDATE_USER, CustomScriptType.USER_REGISTRATION, CustomScriptType.CLIENT_REGISTRATION, + CustomScriptType.CLIENT_REGISTRATION, CustomScriptType.DYNAMIC_SCOPE, CustomScriptType.ID_GENERATOR, CustomScriptType.CACHE_REFRESH, CustomScriptType.UMA_RPT_POLICY, CustomScriptType.UMA_CLAIMS_GATHERING, CustomScriptType.UMA_RPT_CLAIMS, CustomScriptType.INTROSPECTION, CustomScriptType.RESOURCE_OWNER_PASSWORD_CREDENTIALS, CustomScriptType.APPLICATION_SESSION, @@ -203,8 +203,7 @@ public CustomScriptType[] getCustomScriptTypes() { } public CustomScriptType[] getOthersCustomScriptTypes() { - return new CustomScriptType[] { CustomScriptType.CONSENT_GATHERING, CustomScriptType.UPDATE_USER, - CustomScriptType.USER_REGISTRATION, CustomScriptType.CLIENT_REGISTRATION, + return new CustomScriptType[] { CustomScriptType.CONSENT_GATHERING, CustomScriptType.CLIENT_REGISTRATION, CustomScriptType.DYNAMIC_SCOPE, CustomScriptType.ID_GENERATOR, CustomScriptType.CACHE_REFRESH, CustomScriptType.UMA_RPT_POLICY, CustomScriptType.UMA_CLAIMS_GATHERING, CustomScriptType.UMA_RPT_CLAIMS, CustomScriptType.INTROSPECTION, CustomScriptType.RESOURCE_OWNER_PASSWORD_CREDENTIALS, CustomScriptType.APPLICATION_SESSION,