C
C
Comedozw2018-02-10 14:43:31
PHP
Comedozw, 2018-02-10 14:43:31

How to implement automatic authorization?

There is a server written in php with a database. It is required to write a client to this server (desktop). Actually, the implementation of the client itself in C # wpf, communication with the server is carried out through POST / GET requests.
In the client, you need to log in with the automatic login function, that is, the next time you start the application, so that the login and password are not requested at all, and the application is immediately ready to work following the example of Steam and other things) How can this be implemented with a more or less proper level of protection. Is it correct to store the login and password after entering it and just send it to the server all the time when logging in.
How to get the necessary information from the server after authorization? do you need to implement something like a session, send a token to the client and then send all requests with it? But if the token is intercepted, then they will get full access.
Tell me where you can read about authorization and storage of login passwords and access by token or other methods.
I myself understand this for a couple of days, do not judge strictly. Thanks to all

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2018-02-10
@xmoonlight

Is it correct to store the login and password after entering it and just send it to the server all the time when logging in.
No!
1. In general, the password should not be stored anywhere!
2. Password hashing and data exchange must occur each time with a unique parameter.
3. Authorization by token only.
4. Token and password hash - are formed according to the key and are limited in time.
5. The password is hashed with the server's public key, and if the hashes match, then the password was entered correctly and we log the user into the system.

S
synapse_people, 2018-02-10
@synapse_people

JWT look

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question