Custom Authentication Provider

The Custom Authentication Provider allows you to create customized authentication systems.

  1. Select C# Functions and enter a name.
  2. From the Template field, select the Custom Authentication Provider template.
  3. Click the CREATE button.

The class in the template implements the ICustomAuthentication interface and defines authentication functions. The following methods are provided out of the box:

Login Method: Allows users to log in. There are two separate versions:

  • Log in with username and password: Login(string username, string password)
  • Login using a username, an external token, and a refresh token

If the login is successful, the method returns a Token object containing the user’s information. This object includes the following fields: FirstName, LastName, TokenString, RefreshToken, and Username. The user’s login must be validated; this validation can be performed via a REST API or a custom database.

Refresh Token Method: Used to refresh an expired token.

Find Manager Method: Used to find a user’s manager. Frequently used in Process Automation.

Logout Method: Logs the user out of the system. This method has no return value.

Use return null in methods where you want to preserve Kuika’s default behavior. If you want to implement custom authentication logic, uncomment the `return new Token()` code in the template, adjust the field values, and remove the `return null;` line.