Modern Authentication Extensibility

Now, you can use the existing modern authentication feature to implement custom authentication. 

 

To perform the modern authentication extensibility implementation:

  1. Navigate to ModernAuthMast- database table and make an entry for the new custom authentication.


     
    • AUTH_TYPE = Name of your custom authentication without Space
    • ATTRIBUTES = JSON array collection of the input and output attributes required for the new custom authentication
    • Sample ATTRIBUTES value:
       

       

      [{"name":"Name1","val":"","type":"string","isSecure":false,"isMandatory":true,"regEx":""},{"name":"Name2","val":"","type":"string","isSecure":true,"isMandatory":true,"regEx":""}, {"name":"Name3","val":"Value1,Value2","type":"enum","isSecure":false,"isMandatory":true,"regEx":""},{"name":"Name4","val":"","type":"string","isSecure":false,"isOutput":true,"isMandatory":false,"regEx":""}]

       

       
      • name- Signifies the name of the attribute
      • val- Signifies the comma separated value of the attribute if the type is “enum” which will show up in the sign in window as combobox
      • type- Signifies the type of the attribute, possible values are “string”, “int”, “bool”, “enum”
      • isSecure- Signifies whether the  attribute is a secure field- true. For example, password
      • isMandatory- Signifies whether the field is mandatory
      • regEx- Signifies whether there is any regex validation is involved which should be covered by the activity logic
      • isOutput- Signifies an optional value, if set true the sign-in window is not shown
  2. Once the entry is made, it is shown in the Modern Auth Type combobox in the Application Properties. For more information about Application Properties, see AE-RPA-Engage-Automation Studio User Manual.

  3. An activity should be created for the authtype using the ExternalActivityTemplate. When you use this activity in combination with the application, then it is shown in the Sign in Window. If a sign in process is created with the application or sign-in is checked for an SMTP app or API app with the ModernAuthType selected as your custom authentication. For more information, see External Activity
  4. In the activity refer the DLL EV.AE.ModernAuthFramework and create the AuthStateManager instance in the constructor. 
  5. In the ExecuteActivity method, Input properties of the custom authentication can now be accessed using the AuthStateManager’s GetInputProperties method by passing the application id as input.
  6. After the authentication logic is written, if there is any output for the activity you can set the OutputProperties using AuthStateManager’s SetOutputProperties if you need it to be accessible in the AuthStateManager activity.

  7. Following is a sample implementation of the execute activity logic if it is placed inside a sign-in process


     
    • Once  done, output properties from the sign in process can be accessed using the AuthStateManager activity under “Auth Type” Category.