D
D
Disobey2019-12-23 09:28:18
User identification
Disobey, 2019-12-23 09:28:18

How to make authorization in a C++ program with a database?

How can I connect and configure a database (let's say OpenOffice database) to a C ++ program for registration and authorization in it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-12-23
@Disobey

"Correct" authorization is possible only on the database server, when the user logs in to the server and, as a result, the server grants him access rights to data and operations on them.
Install a database server - for example PostgreSql
Installation creates a user with maximum rights and asks for his password.
In the application, you use the appropriate library to access the database - before connecting, ask for a login and password, then connect with the entered data.
It all depends on the security requirements and the criticality of data leakage from the database.
If foolproofing is done for a local database (for example, SQLite), then you can store users and password hashes in the database itself. But at the same time, the user has access to the database itself in the form of a file - he can copy and modify it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question