SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    May 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cross site / platform authentication

    Hi all,

    I'm building a mini-site in PHP/MySQL, where the main site was built in C#/MSSQL (this split of platforms is fixed, for a number of reasons). The existing (main) site has a few thousand users, and the mini-site needs to authenticate using the same combinations of usernames and passwords.

    As I see it, there are two options: replicate the users table from the MSSQL database, or authenticate against the MSSQL database. In both cases I envisage a new user having to go to the main site to sign up.

    The main problem I can see with replication is the potential delay ; but authenticating against the MSSQL server and then doing everything else separately with the MySQL server doesn't feel like a very good solution (potential security issues, unnecessary complexity, ?).

    I've never had to do this before, so I don't know what the main pitfalls might be. Any advice appreciated.

    Thanks

  2. #2
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have access to the main site, you could write a simple web-service, that takes the md5 sum of user-name + password, and returns true or false. Then use this interface from the mini-site, to authenticate users.

  3. #3
    SitePoint Member
    Join Date
    May 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks kyberfabrikken. I suppose the main thing that had been putting me off something like that was the security aspect, but I see how you deal with that.

    Thanks again

  4. #4
    SitePoint Evangelist ghurtado's Avatar
    Join Date
    Sep 2003
    Location
    Wixom, Michigan
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you connect to the MSSQL database from your PHP website?
    Garcia

  5. #5
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I think you're best off using WebServices in this case. This kind of thing is exactly what they are designed for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •