Creating a Custom Authentication Mechanism

To create a custom authentication mechanism to use with REST APIs, do the following.

Prerequisites

How to Start

  1. Open Microsoft Visual Studio.
  2. In Visual Studio, click New Project.

Procedure

  1. In the New Project window, click Class Library.
  2. Click OK.
  3. Add a reference to Ascentn.Workflow.WFBase.dll.
  4. Implement the interface IWFServiceBindingFactory, as in the following example:
    public class RESTADAuthenticationFactory : IWFServiceBindingFactory
  5. Implement the method public bool CheckAuthenticated(), including the following details:
    • Write your own logic to validate the user credential (you might be getting the headers in the request).
    • Return true if user is authenticated.
  6. Build your .dll file.
  7. Copy your .dll file to the folder [AgilePoint Server installation folder]\bin
  8. On the AgilePoint Server machine, click Start > All Programs > AgilePoint > AgilePoint Server Manager.
  9. On the AgilePoint Server Manager window, select your AgilePoint Server instance.
  10. On the right pane, click the REST Port Information tab.
  11. On the REST Port Information tab, click Browse.
  12. On the Global Extended Module window, click the Ellipses.
  13. Select your custom authentication .dll file, and click OK.
  14. On the AgilePoint Server Manager window, click Update.