# Custom User Validation -------------------------------------------------------------------------------- title: "Introduction" description: "Custom User Validation allows you validate user sign ups using custom logic" last_updated: "2026-03-18T07:41:08.534Z" source: "https://docs.catalyst.zoho.com/en/cloud-scale/help/authentication/whitelisting/custom-user-validation/introduction/" service: "Cloud Scale" -------------------------------------------------------------------------------- # Custom User Validation Catalyst offers you the option to validate and authorize end-users to your application using custom functions. This option allows you configure a {{%link href="/en/serverless/help/functions/basic-io" %}}Catalyst Basic I/O function{{%/link%}} to contain the logic of the manner you wish to authorize the user with. During user sign up, the credentials of the user will be validated through this Basic I/O function. {{%note%}}{{%bold%}}Note:{{%/bold%}} To enable {{%bold%}}Custom User Validation{{%/bold%}}, you must first ensure that {{%link href="/en/cloud-scale/help/authentication/public-signup/" %}}Public Signup{{%/link%}} has been enabled.{{%/note%}} Refer the code snippets below a sample Custom User Validation function in Java, Node.js, and Python: {{%tabs%}} {{%tab "Java" %}} {{% panel_with_adjustment header="Custom User Validation - Java" footer="button" class="language-java line-numbers" scroll="set-scroll" %}}public class MainClass implements ZCFunction { private static final Logger LOGGER = Logger.getLogger(MainClass.class.getName()); @Override public void runner(Context context, BasicIO basicIO) throws Exception { try { ZCProject.initProject(); ZCSignupUserValidationRequest requestDetails = ZCSignupUserService.getSignupValidationRequest(basicIO); if (requestDetails != null) { /*Validation logic starts */ LOGGER.info("Inside null check"); ZCSignupUserValidationResponse validationResponse = ZCSignupUserValidationResponse.getInstance(); if (requestDetails.getUserDetails().getEmailId().contains("@notallowedmail")) { validationResponse.setStatus(ZCSignupValidationStatus.FAILURE); // The user has failed authentication } else { validationResponse.setStatus(ZCSignupValidationStatus.SUCCESS); // The actions that occur in the event of a successful authentication can be customized ZCSignupResponseUserDetails respUserDetails = ZCSignupResponseUserDetails.getInstance(); respUserDetails.setFirstName("{customFirstName}"); respUserDetails.setLastName("{customLastname}"); respUserDetails.setRoleIdentifier("{customRoleName}"); respUserDetails.setOrgId("{customOrgId}"); validationResponse.setUserDetails(respUserDetails); } basicIO.write(validationResponse); /* Validation logic ends*/ } } catch (Exception e) { basicIO.write(e); LOGGER.log(Level.SEVERE, "Exception in MainClass", e); basicIO.setStatus(500); } } } {{% /panel_with_adjustment %}} {{%/tab%}} {{%tab "Node.js" %}} {{% panel_with_adjustment header="Custom User Validation - Node.js" footer="button" class="language-javascript line-numbers" scroll="set-scroll" %}}const catalyst = require("zcatalyst-sdk-node"); module.exports = (context, basicIO) => { const catalystApp = catalyst.initialize(context); const userManagement = catalystApp.userManagement(); const requestDetails = userManagement.getSignupValidationRequest(basicIO); if (requestDetails !== undefined) { if (requestDetails.user_details.email_id.includes("node")) { basicIO.write( JSON.stringify({ status: "failure", }) ); } else { basicIO.write( JSON.stringify({ status: "success", user_details: { first_name: "CustomFirstName", last_name: "CustomLastName", role_identifier: "CustomRole", org_id: "CustomOrgID", //If you are providing the Org ID, make sure it is copied exactly from the console. }, }) ); } } context.close(); }; {{%/panel_with_adjustment%}} {{%/tab%}} {{%tab "Python" %}} {{% panel_with_adjustment header="Custom User Validation - Python" footer="button" class="language-python line-numbers" scroll="set-scroll" %}}import json import zcatalyst_sdk def handler(context, basicio): app = zcatalyst_sdk.initialize() auth_service = app.authentication() request_details = auth_service.get_signup_validation_request(basicio) if request_details: if "spam.com" in request_details["user_details"]["email_id"]: basicio.write(json.dumps({"status": "failure"})) else: basicio.write( json.dumps( { "status": "success", "user_details": { "first_name": "Amelia", "last_name": "Jack", "role_identifier": "cx_role", "org_id": orgId, # If you are providing the Org ID, make sure it is copied exactly from the console. }, } ) ) context.close() {{%/panel_with_adjustment%}} {{%/tab%}} {{%/tabs%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} These snippets are also available in the Catalyst {{%link href="/en/sdk/java/v1/cloud-scale/authentication/custom-user-validation/" %}}Java SDK{{%/link%}}, {{%link href="/en/sdk/nodejs/v2/cloud-scale/authentication/custom-user-validation/" %}}Node.js SDK{{%/link%}}, and {{%link href="/en/sdk/python/v1/cloud-scale/authentication/custom-user-validation/" %}}Python SDK{{%/link%}} repositories.{{%/note%}} -------------------------------------------------------------------------------- title: "How It Works" description: "Custom User Validation allows you validate user sign ups using custom logic" last_updated: "2026-03-18T07:41:08.534Z" source: "https://docs.catalyst.zoho.com/en/cloud-scale/help/authentication/whitelisting/custom-user-validation/how-it-works/" service: "Cloud Scale" -------------------------------------------------------------------------------- # How Custom User Validation Works The following steps detail how you can use custom logic to authenticate end-user sign ups: {{%note%}}{{%bold%}}Note:{{%/bold%}} {{%link href="/en/cloud-scale/help/authentication/public-signup/" %}}Public Signup{{%/link%}} must be enabled to use Custom User Validation.{{%/note%}} 1. When an end-user signs up to your application using the Sign Up action configured by you, the Catalyst server will check if {{%link href="/en/cloud-scale/help/authentication/whitelisting/custom-user-validation/introduction" %}}Custom User Validation{{%/link%}} has been enabled. If it has been enabled, then the {{%link href="/en/serverless/help/functions/basic-io" %}}Basic I/O function{{%/link%}} that you have used to engineer the validation logic will be called and the user details will be passed to the validation function as a {{%badge%}}.JSON{{%/badge%}} object. {{%code class="language-json line-numbers"%}}{ "request_type": "add_user", "request_details": { "user_details": { "email_id": "emmy@zylker.com", "first_name": "Emma", "last_name": "Thompson", "org_id": "43************", "role_details": { "role_name": "App User", "role_id": "10********" } }, "auth_type": "web" } } {{%/code%}} {{%note%}}{{%bold%}}Note:{{%/bold%}} * Custom User Validation only applies for sign up action, i.e., when the user tries to access your Catalyst application for the very first time. * If you wish to alter any one of the input details for validation, the input to the function has to be sent as the complete .JSON object. {{%/note%}} 2. If the user's authentication in successful based on the custom logic coded by you, then the user will be able to access the application, and the details of this user can be viewed and managed in the {{%link href="/en/cloud-scale/help/authentication/user-management/introduction" %}}{{%italics%}}User Management{{%/italics%}}{{%/link%}} section. 3. If the end-user's details do not meet the authentication requirements you coded, then they will not be able to access the application. -------------------------------------------------------------------------------- title: "Implementation" description: "Custom User Validation allows you validate user sign ups using custom logic" last_updated: "2026-03-18T07:41:08.534Z" source: "https://docs.catalyst.zoho.com/en/cloud-scale/help/authentication/whitelisting/custom-user-validation/implementation/" service: "Cloud Scale" -------------------------------------------------------------------------------- # Implementation To use the {{%italics%}}Whitelisting{{%/italics%}} section you have to configure at least one authentication type: {{%link href="/en/cloud-scale/help/authentication/native-catalyst-authentication/hosted-authentication-type/introduction/" %}}Hosted Authentication Type{{%/link%}}, {{%link href="/en/cloud-scale/help/authentication/native-catalyst-authentication/embedded-authentication/introduction/" %}}Embedded Authentication Type{{%/link%}}, or {{%link href="/en/cloud-scale/help/authentication/third-party-authentication/introduction/" %}}Third-party Authentication Type{{%/link%}}. You can access the {{%italics%}}Whitelisting{{%/italics%}} by navigating to {{%bold%}}Cloud Scale > Authentication{{%/bold%}} in the console, and clicking the {{%bold%}}Whitelisting{{%/bold%}} option. <br /> Custom User Validation enables you to validate your end-users using a custom logic as defined by you in a {{%link href="/en/serverless/help/functions/basic-io" %}}Basic I/O function{{%/link%}}. {{%note%}}{{%bold%}}Note:{{%/bold%}} * {{%link href="/en/cloud-scale/help/authentication/public-signup" %}}Public Signup{{%/link%}}must be enabled to use Custom User Validation * The custom validation function must already be coded as a Basic I/O, in {{%link href="/en/sdk/java/v1/cloud-scale/authentication/custom-user-validation/" %}}Java{{%/link%}}, {{%link href="/en/sdk/nodejs/v2/cloud-scale/authentication/custom-user-validation/" %}}Node.js{{%/link%}}, or {{%link href="/en/sdk/python/v1/cloud-scale/authentication/custom-user-validation/" %}}Python{{%/link%}} and present in the Catalyst console in {{%link href="/en/serverless/help/functions/introduction/" %}}Serverless Functions{{%/link%}}{{%/note%}} Custom User Validation will be **disabled** by default, and you have the option of configuring it in two ways: {{%note%}}{{%bold%}}Note:{{%/bold%}} You can also enable Custom User Validation in the *Additional Settings* section during the last step of all the authentication setups. <br /> {{%/note%}} ### Enable Custom User Validation 1. Click the **toggle button** present next to the **Custom User Validation** option in the *Whitelisting* section. <br /> {{%note%}}{{%bold%}}Note:{{%/bold%}} {{%link href="/en/cloud-scale/help/authentication/public-signup/" %}}Public Signup{{%/link%}} must be enabled to use Custom User Validation. As mentioned earlier, you can enable while setting up an authentication type using the {{%italics%}}Addional Settings{{%/italics%}} section.{{%/note%}} 2. Select the {{%link href="/en/serverless/help/functions/basic-io/" %}}Basic I/O function{{%/link%}} that contains your custom logic from the dropdown. <br /> 3. You can click **JSON Validation** button to view and copy the sample JSON input to test the function. You can test this input with a sample function available in the respective {{%link href="/en/#DeveloperTools" %}}SDK sections{{%/link%}} of each stack, or with your own custom logic. <br /> 4. Click **Configure** to finish enabling Custom User Validation. <br /> ### Disable Custom User Validation You can disable the *Custom User Validation* option if you no longer wish to validate user sign ups using a custom logic, by simply clicking the toggle button to disable *Custom User Validation*. <br /> Custom User Validation will be disabled, and can be re-enabled again at any time. {{%note%}}{{%bold%}}Note:{{%/bold%}} Custom User Validation will automatically be disabled for your application if you disable {{%link href="/en/cloud-scale/help/authentication/public-signup/" %}}Public Signup{{%/link%}}.{{%/note%}}