Authentication

You can apply this task to implement the login functionality in the application. When this task is executed, it invokes the Auth_Vahana service to authenticate the login request.

The Auth_Vahana service captures the request details and then validates the login details. To implement the login functionality, four types of parameters are configured:

  • Request Type
  • Login ID
  • User ID
  • Password

To configure the Authentication task:

  1. In the Events dialog box, scroll down.
  2. Under Add Tasks, click the Select Task list, and then select AUTHENTICATION task.
  3. Click Add Task Config, and the Add Task dialog box opens.
  4. In the Add Task dialog box, click the Configuration area to expand it.
  5. In the Configuration area, perform the functions as follows:
Property/FieldDescription
Service NameThis field automatically displays the service name (Auth_Vahana). The Vahana platform by default provides the Auth_Vahana service that you can consume to implement the login mechanism.

Note:- If you have created another authentication service and published it to the vConnect portal, you can use that service in place of the Auth_Vahana service. Or, you can use the Auth_Vahana service.
Success PathIn this field, enter a data path that stores the success status code. The API will return this success status code after it validates the user’s login request. You can define the data path as follows:
getVal(“tempObject.status”)

In the data path, the status parameter will store the success status code.
Success ValueIn the field, enter the status code or value (for example:- y) that the service will return after it validates the user’s login request.
Success Message PathIn this field, enter the data path that stores the success message. After the API validates the user’s login request, it will return and display this success message. You can define the success message path as follows:
getVal(tempObject.sucmsg”)

In the data path, the sucmsg parameter will store the success message.
Error Message PathIn this field, enter the data path that stores the error message. After the API invalidates the user’s login request, it will return and display this error message. You can define the error message path as follows:
getVal(“tempObject.errmsg”)

In the data path, the errmsg parameter will store the error message.
  1. After you enter the service-related details, define the key/value pair as follows:
FieldDescription
Key NameIn this field, enter the parameter’s or key’s name (for example:- userId).

Note:-
In the Key Name field, the parameter name must match the parameter (including case sensitivity) that is defined for the service on the vConnect portal.
TypeIn this field, select one of the following values:
1. Fixed
Select this option to store the value in the key in string format.


2. JSON
Select this option to store the value in the key in JSON format.
Data PathIn this field, you can enter the data path as follows:
i. In the Type list, if you select Fixed, enter a fixed value (for example:- 1234) in the Data Path field. When the AUTH_VAHANA service is invoked, the request will send the 1234 value.

ii. In the Type list, if you select JSON, enter the data path by using the getVal() function as follows:
getVal(“tempObject.userId”)

When the AUTH_VAHANA service is invoked as a result of the user action, it picks the value of the userId parameter and then validates the user name.
  1. After you define the key/value pair as described in the last table, define the key/value pair for the password and other types of data.
  2. After you define the service-related parameters, data path, and key/value pairs for the required data, click Submit to configure the AUTHENTICATION task.

Was this article helpful?
YesNo