views:

52

answers:

2

I'm about to start a human resources web app system. My idea is to have the manager system and the website work with the same database, but make three or more "products" running with the same data. All in PHP and JavaScript.

My question is how can I get an authentication system like Zoho or Google, with one account for all services, and how can i store this. In a single table? LDAP? Which one?

+2  A: 

If they're all on the same domain, then why treat them as one app? Either have a single auth table in your db or use a seperate db called by all three apps.

As for the actual auth system, there are many ways - the one you choose will depend upon your individual requirements.

If you plan on extending the apps provided, it might be worth looking at setting up an OpenID provider for your domain and/or allowing logins from other OpenID providers (like StackOverflow does).

adam
OpenID is a good auth method?? I think, as openid is "multi-plataform" is a good way to extend my services later, don't???
Roberto
I've not implemented openid and it might be more work upfront but would allow your users to log in to other webapps/domains with the same details
adam
A: 

I would look around for "PHP Authentication frameworks"

Login Sessions might be something to checkout.

I've rolled my own code for this in the past. Creating a schema for platform objects and defining permissions for what user/group can access what applications. Below is a simple schema for this type of thing.

Table Users
     UserID
     ...

Table Applications
     ApplicationID
     ...

Table Permissions
     PermissionID
     ...

Table UserApplications
     UserApplicationID
     UserID
     ApplicationID
     PermissionID
     ...
Chad