1. Home
  2. Examples
  3. Creating an Authentication Workflow

Creating an Authentication Workflow

The purpose of this tutorial is to give an example of what an Authentication Workflow could look like.

The Authentication Workflow can contain any inputs and validation you require, but it must contain a [[UserGroups(*).Name]] recordset marked for Output.

This [[UserGroups(*).Name]] recordset will be encrypted into the Token and is used in the authentication of the token.

This workflow must also be public. Please see Configuring Token-Based Authentication on how to do it.

1. Create a New Workflow.

2. Drag and drop an Assign from the toolbox on to the design surface and connect it to the Start node.
Then assign your input variable
[[validAuthenticationKey]] = XR5L2NsYWltcy9hdXRoZW50aWNhdGlvbiI6
auth-workflow-validkey-assign

3. Drag and drop a Decision from the toolbox on to the design surface and connect it to the Assign tool above.
Add variable [[authenticationKey]] = [[validAuthenticationKey]]. Click Done.

auth-workflow-decision-tool

4. Drag and drop an Assign from the toolbox on to the design surface and connect it to the True arm of the Decision Tool.
Add recordset [[UserGroups(1).Name]] and assign Collections to the value. Click Done.

auth-workflow-validGroups-assign-output

5.  Drag and drop an Assign from the toolbox on to the design surface and connect it to the False arm of the Decision Tool.
Add recordset [[UserGroups(1).Name]] and assign nothing to the value. Click Done.

6. In the Variables, mark [[authenticationKey]] as Input, and mark [[UserGroups(*).Name]] as Output.

auth-workflow-variables

7. Click Save, name your workflow CollectionsAuthentication and Click Save.

8. The workflow should look as follows:

auth-workflow-final-workflow

9. Press F5, enter the value for the [[authenticationKey]] marked as Input. Click Debug.

10. In the Output window, if the [[authenticationKey]] validated True, the [[UserGroups(*).Name]] will return with data. If it failed, the recordset will be blank.

 

FacebookTwitterLinkedInGoogle+Email
Updated on July 17, 2020

Was this article helpful?

Related Articles

Enjoying Warewolf?

Write a review on G2 Crowd
Stars