A Custom Authentication Provider is a specially created structure to authenticate users and provide security when standard authentication solutions are insufficient. It is usually designed for specific requirements or functions.
You can follow these steps to create a Custom Authentication Provider:
Select “C#” (1) as the Data Sources data source type, enter a name (2).
Then select the “Custom Authentication Provider” method.
Then click on the “CREATE” (3) button.
The created Custom Authentication Provider opens with a predefined class. It contains a C# class and an instance of a class that implements the custom authentication provider. This class provides the customized functionality for user authentication and contains comments to describe this functionality.
The Custom Authentication class implements the Custom Authentication interface. This interface defines the authentication functions. The following methods are provided in the code ready for users:
Login Method: Allows users to log in. There are two versions: one for logging in with username and password, the other for logging in with username, an external token and a refresh token. Within the method, the user's login process needs to be validated. The validation can be done from fields such as the Rest API or a custom database. Accordingly, additions may need to be made to the code.
Refresh Token Method: Used to refresh an expired token.
Find Manager Method: It is used to find the manager of a user. It can be used frequently in Process Automation.
Logout Method: Allows a user to log out of the system. Logout method does not have a return value. In Custom Authentication Provider, fields where return null values are not returned are valid. The values in Kuika are considered invalid; when a null is returned, the values in Kuika are valid.