Configure Forms Provider for Authentication
- Last UpdatedJun 10, 2024
- 3 minute read
You can create a Repository with Forms Provider for Authentication. Repository with Forms authentication implies that the user details are fetched from a user defined table. These details can be used for various purposes like login authentication into the Enterprise Console, assigning actors to the human activities and others.
Following are the steps that are required to create a repository with forms authentication:
-
Prerequisite - Create a table that contains the user details. The table could be in the same database that is mapped to the repository or in a different database. For example:
Create table Users(UserIdentifier int,FirstName varchar(50),PasswordValue varchar(50), LastName varchar(50), Email varchar(50),ManagerId int)
-
In Central Configuration, click the link Repository Settings that is under the title Repository. Now the repository list page is displayed.
-
Click the link named "Create Repository" that is just below the repository list. Manage Repository page is displayed.
-
The Manage Repository page contains fields on the right side of it that needs to be filled. The mandatory fields that need to be configured are:
-
Repository Data Source – Select data source listed in this drop-down. If selected data source is not listed in the drop-down then click the link "Create data source" below the drop-down to create a new data source.
-
Attach Data Source – To attach the data source, that is being used by any other repositories then check this option. Then a drop-down with all the repositories will be listed and user can select one from them.
-
Repository Name – Provide a repository name in this field.
-
Description - Provide a description for repository in this field. [optional]
-
Servers – Select server from the list box provided.
-
Resource Provider – In this drop-down, select the provider as Forms.
-
User entity Properties – Enter the XML code that identifies user properties.
The XML code consists of the main tag<properties> followed by the sub tags <property > and its attributes. The property tags are case sensitive. The property attributes should match the columns that are present in the user table newly created.
For example, the columns of the table created by executing the above sample query consists of the columns matching the property attributes in the below sample code.
Sample code
<properties>
<property name="UserIdentifier" type="int" purpose="identifier" displayname="Useridentifier" />
<property name="FirstName" type="string" purpose="name" displayname="First Name" />
<property name="PasswordValue" type="string" purpose="password" displayname="PasswordValue" />
<property name="LastName" type="string" displayname="Last Name" />
<property name="Email" type="string" displayname="Email ID" purpose="email" />
<property name="ManagerId" type="string" displayname="ManagerId" purpose="manager" />
</properties>
-
-
User Provider Properties – Enter the XML code to map user properties in the provider to the user Entity Properties.
Sample code
<properties>
<property name="UserIdentifier" type="int" purpose="identifier" displayname="Useridentifier" />
<property name="FirstName" type="string" purpose="name" displayname="First Name" />
<property name="PasswordValue" type="string" purpose="password" displayname="PasswordValue" />
<property name="LastName" type="string" displayname="Last Name" />
<property name="Email" type="string" displayname="Email ID" purpose="email" />
<property name="ManagerId" type="string" displayname="ManagerId" purpose="manager" />
</properties>
Data Source – Provide the connection string to the data source.
Data Table/View – In this field, specify the table that provides the user details. For example, created a table by name Users, specify the same name here. i.e Users. In case the user details has to be fetched from than one table then user can specify view in this field.
User login Property – Specify the column name of the field which has to be authenticated for login. For example: UserIdentifier
Click Test Sql Connection to check the status of the connection. If the message displayed is "Test Connection Succeeded" then click OK button that is at the bottom of the page.