PDA

View Full Version : Authentication against existing database


kia44
09-30-2004, 03:49 PM
Hello,

I am a studnet worker and I am not very familiar with PHP. The place I work for has already bought vBulletin and is looking to use vBulletin as a forum for high school teachers where they can share their ideas or whatever. We have an existing database that includes all our users and passwords and email addresses, etc. The database is set up as a web service. My job is to figure out a way (hack) to call this database as a webservice using PHP, for authentication for vBulletin and copy the authentication information in to the mysql database for the forums. In a way, we want the mysql database for the forum to be an extension of our original database. I have done some reaserach and i am not sure how to go about this. I am suppose to use a SOAP header to encrypt, authenticate and authorize users. But my main problem is just calling the database/web service with PHP. Any ideas would be appreciated.

Thanks,

Kia

P.S. I do have WSDL files and also SOAP request and response samples available to me.

Colin F
09-30-2004, 03:56 PM
hmmmm

lets see. What kind of database do you currently have (with the authentification information)? MSSQL, MySQL?

What you would probably have to do, is set up vBulletin (if you haven't done so yet), and then code some kind of import script which fetches the users from the old database and inputs them in the new one. Don't forget to add a $salt for each user and to encrypt the password with it.

kia44
09-30-2004, 04:28 PM
I took this straight out of the description I got from the project design document:

"The database may be implemented on any enterprise capable RDBMS, and will be fully SQL-92 compliant in its design. It is recommended at this time that SQL Server 2000 be used. The database will be accessed via XML Web Services to enable cross-platform integration for any end use application."

It's not a database we want to get rid of. It's the main database and I just need to get the information for authentication by calling it as a webservice. I am not sure if fetching and inputing the users would work. What would be the best way to call a web service using PHP? I guess that would be the first step.

Kia

Colin F
09-30-2004, 04:57 PM
OK, it seems that's to high for me, sorry.

Still, good luck!

kia44
09-30-2004, 05:06 PM
Yeah, seems that way for me too, but I can't give up! :)

Thanks anyways,

If anyone else has any ideas let me know please!

Kia

miz
09-30-2004, 06:02 PM
hey Kia44 i posted a hack that makes what you want
in here :
https://vborg.vbsupport.ru/showthread.php?s=&threadid=63972

hmm if you want i can costumize it to your needs

kia44
09-30-2004, 06:32 PM
I am not sure if that's really what I need. If you read the first post in the thread I think my problem would be a little more clear.
I forgot to put that the whole point is that I don't want users to have to register to use the forum, since they already have a username and password in my other database. I just want to call my database/web service using PHP and authenticate the users for the forum and then save the authentication information in the mysql database so next time they can be authenticated against that.

I might still be able to use your code alittle bit, but not much I don't think.

Thanks,

Kia44

Colin F
09-30-2004, 06:40 PM
me again...

I just wanted to mention that it might be worth discussing this project again, to see what the reasons for keeping that database are.

If you still find that that's the only way to go, here are some tips:

You'll have to add a user with those details anyway, as almost any action has an influence on the user table. That being things from permission checking (based on usergroup) to updating the post count or the lastvisit timestamp.

You might be able to adapt the login function to fit your needs. That should cover all the instances of logins, if you get it to work...

Once again, good luck!

kia44
09-30-2004, 07:00 PM
the database has to be kept, because different departments in the organization use the database to do the same thing or for other reasons. It is the main database for the company, and it can be used by different departments as a basis for user-identified software applications. It's not something I have control over considering this is such a huge organization and I am only a student worker. ;) But yeah, I really appreciate the ideas and tips. So if you ahve anymore, send them my way! :)

Greets,

Kia