- NSIS Discussion
- Username Password Validation via HTTP
Archive: Username Password Validation via HTTP
mceo
9th December 2002 06:36 UTC
Username Password Validation via HTTP
Hello,
We are building a community website for our school, and we are going to publish our activity documents on the website. Because the file list is to large we thought we should better make an installer and put an ms word document viewer in it. It's going to be easier for teachers.
Problem is the content has to be private, it's not going to be cool if some users share the installer.exe.
I wonder if that's possible with NSIS.
1) Send a username / password pair (via a dialog box?) to http://website.com/index.php?username=$username&password=$password
2) Depending on the response, either proceed the download or cancel.
I'm a bit lost in this thing and any help is greatly appreciated.
Thank you,
Mahmut
Joost Verburg
9th December 2002 09:03 UTC
Use an Install Options page to get the user/pass and use the nsisdl plugin to download the file.
Have a look at the documentation for info about the commands to read values from a file.
mceo
9th December 2002 11:55 UTC
Hi Joost,
Thank you for your message, but I'm really new to this. Could you explain what you mean with install options page? Also using this approach is it possible to check if their download is successful or not? So we can track the users that successfully downloaded the document pack.
Thank you again,
Mahmut
Yathosho
9th December 2002 12:17 UTC
InstallOptions is an add-on for NSIS, you can find it in NSIS\Contrib\InstallOptions. NSIS also comes with a couple of examples for InstallOptions, also have a look on its documentation .
Joost Verburg
9th December 2002 13:10 UTC
That file is quite outdated. You should use the Install Options documentation included in the NSIS installer.
mceo
9th December 2002 22:01 UTC
Hi guys thank you again. I checked the documentation and example files as you have told, but I couldn't find an example of user validation. What I'm trying to do is have the users enter a username, password in the installer and then validate this username, password with using a php page (validation against a database), and then at the end of the download I would like to send a request to another page to tell the database that download is completed successfully. The INI file looks static.
Please let me know if I'm on the wrong way,
Mahmut
Joost Verburg
9th December 2002 22:11 UTC
You need to create an INI file for the custom dialog, a dialog with a textbox for username and password.
You can get thes values from the INI file and use nsisdl to download the file from the internet. Use the file instruction to (FileOpen etc.) to read the info from the you downloaded.
mceo
9th December 2002 22:42 UTC
thanks a lot, this makes sense. I'm going to work on it, once it's done I'm going to put the code on the forum so other users can use it.
mceo
10th December 2002 04:48 UTC
okay, I'm almost done with it. Now it connects, query the database, return the results and according to the result it starts downloading the file. But I couldn't figure out how to resume the downloads.
Is there a way to support resuming via nsis download plugin ?
Thank you,
Mahmut
kichik
10th December 2002 14:34 UTC
NSISdl doesn't support resuming.
mceo
10th December 2002 23:04 UTC
But I saw an NSIS installer with stop / resume support and there is also a thread in the forums about this, but I couldn't make it work.
kichik
11th December 2002 14:42 UTC
http://forums.winamp.com/showthread....=nsisdl+resume
Is this is the patch you are talking about?
It was never accepted for the reasons Justin listed there. The NSISdl that comes with NSIS doesn't support resuming.
mceo
11th December 2002 23:04 UTC
Hi,
Yes, it was the post I was talking about. I already saw that implementation on an nsis installer. But if it's not safe, we better not use it. Once again, thank you for your prompt reply.
Mahmut