I'm a bit stuck on the Onion Architecture.
Say I'm developing an application where a user can register an account, log in and maintain their account(E.G. Change Phone Number).
However, while they are logged in, they can do other application stuff (E.G. Create products, add blog entries, send messages with photos attached etc...)
I'm struggling to define business logic and here is why.
All application services gets saved into a Postgresql
Database.
All User management functions and logging into their account gets handled by LDAP 389 Directory Server
. I will be using the Novell.Directory.Ldap
Package as this will be running on mono and there is no support yet for System.DirectoryServices.Protocols
Both the application database and the Directory server have unique tables.
Do I put both the Application Database Entities and the LDAP Directory Service Models in the App.Domain.Entities?
Technically speaking I have 2 different types of databases with different types of models.
Not entirely sure how to approach this one.
My Solution Structure:
I'm pretty sure I'm doing it wrong. Can someone please point me in the right direction with some sort of pseudo example. e.g. Where does the models go etc.
Thank you in advance
For Single Sign On Applications, you probably want to move all of the Security out into a Separate Service that works directly with your LDAP Provider. That way you are not tightly coupling Product Specific LDAP Code into your Web Application. Your Web App can then call the Security Service passing it the Login Credentials of the User who is signed into the OS. That way if you're needing to grant permissions to Groups of User or Users, you can just be returned a boolean from the Security Service of whether that Logged in User is Authorized.