Authentication

Catalyst Authentication features enable you to add end-users to your Catalyst serverless applications, configure their user accounts and roles, and manage user sign-in and authentication of your application. You can learn about working with Catalyst Authentication from the remote console from the Authentication help document.

Refer to the API documentation for the APIs available for Catalyst Authentication.

Add a New User

When a user has signed up to a Catalyst application, unique identification values like ZUID and userID are created for them. The user is also assigned to an organization by Catalyst. You can learn more about this from the Users help page.

You can add a new end-user to your Catalyst application using the code below. The user details such as their email address, last name, the application platform and the role they must be added to, are passed through an instance of the ZCSignUpData class. The user registration process is handled by the registerUser() method, after obtaining an instance of the ZCUser class.

Note:

  • You will be able to add only 25 users in your application in the development environment. After you deploy your application to production, you can include any number of end-users in it.
  • You must provide the values for EmailId and LastName to register a user mandatorily.
  • You can obtain the RoleId from the Roles section in Authentication in the Catalyst console.

Ensure the following packages are imported:

Copiedimport com.zc.component.users.PlatformType 
import com.zc.component.users.ZCSignUpData 
import com.zc.component.users.ZCUser
Copied//Get an instance of ZCSignUpData 
ZCSignUpData signUpdetails = ZCSignUpData.getInstance();
//Pass the necessary data for the sign-up using the instance
signUpdetails.setPlatformType(PlatformType.WEB);
signUpdetails.userDetail.setEmailId("p.boyle@zylker.com");
signUpdetails.userDetail.setLastName("Boyle");
signUpdetails.userDetail.setRoleId(1256000000228024L);
//Register the user using an instance of ZCUser class
signUpdetails = ZCUser.getInstance().registerUser(signUpdetails);