Authentication with LDAP
This section introduces a simple business logic definition about authentication with LDAP.
Create a REST API workbook via the 'REST API Sample Model'. For the detailed procedures, you can refer to the Get Started section.
Click Add Definition button in AlchemyJ ribbon, select External Resources to add the ##ExternalResources worksheet. Define LDAP connection information record in the LDAP Connection section.
Use the function =ajLDAPLogin() in B8, key in the following formula. Then, the input parameters are user name and password from cell B1 to B3. The output result is B8 where it returns the authentication result.
Define the output address in Output Schema table. Since the header is on the left, choose the Header Position as 'left'.
Update the Function Point and Path with a more meaningful value.
Define the function point parameters in ##RestEndpointGroup worksheet. The input parameters are single values in text format, thus set the DataType as String. The Data Addresses are BizLogic!B1,BizLogic!B2 and BizLogic!B3. Please use ajAddress to set the Data Address, e.g. ajAddress(BizLogic!B1). When the cell address is changed due to adding or removing some range, it will be re-calculated automatically. The input configurations of this function is as shown in the screenshot below.
Done! You can click the Preview Function Point button on the AlchemyJ ribbon to test it. TRUE would be returned on cell BizLogic!B8 if the configuration and the inputted user name and password are both correct. FALSE would be returned if authentication fails. When there are issues connecting to the LDAP server, #Value will be returned.