There are many ways to integrate WorkflowGen into your PHP web app, and displaying the WorkflowGen User Portal inside an iFrame is one of the most widely implemented solutions.
First, we suggest exporting your existing users from your MySQL database to CSV TEXT files (users, groups and users-groups) in order to synchronize the users and groups into the WorkflowGen database.
Having the list of users within WorkflowGen is required because they are used and referenced throughout the application, such as user roles and permissions in a workflow.
WorkflowGen does NOT need to manage user passwords; they can still be handled by your PHP web app. You only need to have all the users’ information in WorkflowGen.
See the the Text section in the WorkflowGen Administration Guide for information on the structure of TEXT files (users, groups and usergroups).
Second, once you have the users inside the WorkflowGen database, WorkflowGen can rely on your PHP session cookie to perform the SSO authentication that will allow or deny user access to WorkflowGen.
The solution is based on a custom HTTP module, which will check if there is an existing and valid PHP session cookie (created by your PHP web app). See the Custom Authentication section in the WorkflowGen Integration Guide for information on custom HTTP modules.
If YES, then this means your PHP web app has already authenticated the current user, so WorkflowGen just needs to create a GenericPrincipal
object based on the current username (the same username must already exist in the WorkflowGen database). Then, this object will be assigned to the application context and let the user enter WorkflowGen.
If NO, then you can prompt the current user for their credentials (username and password), then query your MySQL database to check if the credentials match. If OK, then create the GenericPrincipal
object as in the above step, then let the user in.