In the login service, the user sends json as a payload to the Spring RESTful login service, as shown below:
{
"username": "john",
"password": "doe"
}
Once the RESTful Spring service accepts the call, it compares the password with one repository in the database in plain text.
I see two problems in the current implementation.
- The password is sent via HTTP as a POST payload in plain text.
- The correct password stored in the database is in plain text.
For problem 2, I decided to use bcrypt to encrypt the password stored in the database as indicated in this post . Is this a good way?
1 , . - ? !
Edit:
, , HTTPS. POST.
2 ( ) , ?
1, ?