简体   繁体   中英

Store users information in a single file on the root of the web server JavaScript/HTML/CSS

I'm trying to do an authentication system for a website that is supposed to be stored on an intranet. The guy told me he wanted the credentials of the users (max 10 users) to be stored on a single file with some kind of protection. Do you have suggestions.? I really tried to find information, maybe I am not searching for the right thing but everybody uses mondoDB in this kind of situation. Which is not stored locally. be gentle please... I trying to do it in JavaScript.

When you mentioned a single file on the server, I thought of SQLite. As per the projects description :

The complete state of an SQLite database is usually contained in a single file on disk called the "main database file".

But passwords - even on an intranet server - should never be stored in plain text. And one-way hashing where the source code is also present does not sound like a good idea.

However, sqlcipher seems to solve both those issues. As a starter, you might want to setup a brief tester with plain SQLite.( Here is one simple tutorial).

From there you can look at a sample like this one which shows how sqlcipher could be used with a JavaScript engine like Node.js.

I've tried like that to make it easy

The Javascript Code

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