简体   繁体   中英

how to connect using a password in distant secure file

I have a web app (html5,javascript,css ..) with a connection page,

but in this page i only put the password in a JavaScript file to do the test, than i have figured out that any one who can open the google chrome console can see the password.

So i want to put the password in a distant secure file in my case webserver wamp how can i do it ?

I've read about cgi scripts but i don't know how to use it, please if you have any tutorials or an ideas like ssl or something else i'll be very thankful.

If you match a password with anything on the client side, then your application is NEVER going to be secure. You want the provided password to be matched against something which the user does not see.

Start from here to better understand differences. And then take a look here for an implementation. It uses a database backend. But you could easily replace that with file content matching. After that, most likely you'll need to work with a session to ensure authentication is enforced.

Although I do not recommend it, if you're in a hurry and don't need too much security, you can also take alook here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM