I'm currently working on a website where I'm having to validate users by their username/password using ajax to send the values to my controller.
At the moment I have an input for username and an input of type 'password' for the password. Obviously this means the password is hidden on the front-end, but when I'm posting my values to the controller, I've checked the request and noticed that the password is sent in clear text. Am I doing something wrong?
I would have thought that really you should hash the password using javascript, then send that value and validate the unhashed value on the back-end. I suppose another alternative would be to use https? Is that the preferred method?
I'm not sure if I've handled this whole process correctly. Basically I'm trying to log in a member by validating their username/password that are sent via ajax yet I'm concerned that the password is being sent over in clear text. What's the correct approach to be taking?
Thanks