Hi ,
Do we have any chance to use our own database(own entities) to login access instead of taking the data from Outsystems entities. Please let us know if there is any logic or any steps to do the setup things, please help me with this priority based.
Thanks!
Hi Aravind,
You can have your own way of authenticating your user, but you still need to have a record for each external user you want to allow being logged in.
There's an attribute External_Id in the User entity which you can use to reference your external User table's primary key.
So authenticate the user using your own tables and your own set of password management with encryption etc. Once authenticated, use the Login server action of (System) module to login that user in Outsystems. After that it works as a regular user in Outsystems.
You don't have to bootstrap all the users at once and keep syncing all the time. Just allow them to login and if they are authenticated, find out the user in Outsystems User entity using the External_Id key. If found then just log them in, otherwise create a new record in Outsystems User entity with appropriate External_Id and then log them in immediately to ease up your flow.
Note: There's a password field in User entity of Outsystems. You can keep it blank if you are authenticating them only using your external tables.
Read more here Use OutSystems with existing databases about how to use your external databases in Outsystems. It might look bit of a challenge at first, but once you know how it works, it is very easy and well-documented process.
Hi Ravi Punjwani,
I have gone through your reply one thing I did not understand,
"There's an attribute External_Id in the User entity which you can use to reference your external User table's primary key. "
I added one entities in my application attributes like
ID
Username
Password
In user (system) entities I seen same like username and password along with some other informative fields with Exteranal_Id attribute.my question is how can I connect my own entity with Systems Entity, and how can i insert the external_id in users (System)Entity.
i am not able to edit the system entity to edit the data tab of external_id with my entity id.
please give me the brief.
Hi @Aravind Badeti
You can update / insert into the Users table with your user related values. In the External_Id field, you have to save the primary key value of your external User table (same like you created one entity in your applications). That entity's primary key, you have to save in User entity's External_ID.
A user tries to login using password, which you want to validate from your custom authentication logic (for example, your own User_Custom entity), so you match their custom username and custom password fields on User_Custom and found OK to login. Then get the primary key of User_Custom and find records in system User entity filtering with User.External_Id = User_Custom.ID. If you find any records (which you will, if you've properly linked your internal users and external users) then find out ID of system's User entity and use System module's Login server action which allows login using only the UserId.
If you didn't find the matching record in User enitty, then just create one, and make sure to save the External_Id value with your User_Custom's primary key, so next time they login you won't have to create another user, just use this recently created user only.
Although this is technically possible, I'm wondering why you needed such requirement when there's already nice User management system already in place with Outsystems? Please answer this, so our thoughts can process your information and can suggest a better workaround as per your requirements.
Hi,
Afaik you can't create custom authentiation(Such as create your own user table) in Outsystems.
Although you can use external authentiation serivce. Please refer to link bellow.https://success.outsystems.com/Documentation/11/Developing_an_Application/Secure_the_Application/End_Users/End_Users_Authentication
Kind Regards