So I am using Process Maker in my laravel application to get a lot of work done. But my employers don't like their APIs and I personally don't either. They are too confusing. Plus we don't need all the functionality.
So I am creating APIs in laravel itself to consume those APIs and transform the data coming in and going out to my preference. Since PM has OAuth2 in it, we are using that.
But we need authentication in our system too. So we are using JWT tokens for it. And the JWT token holds the access token for the PM application when it needs to be consumed within my application.
My problem is that now I am using the user base of PM, my policies in laravel are failing and the old APIs built using those policies are failing as well. The reason being that the user table in my application does not really have the users anymore and their permissions are failing.
So would it be a good idea to use the User model in laravel and connect it to PM's user table using the $connection
and $table
property or would it better to hack up a non eloquent base User model and let laravel authenticate using that. And that model will hit PM's APIs for fetching users and so on.
Has anyone had similar experience while working with laravel and what is a suitable solution to go for it? Because I am really confused on how to tackle such a scenario.