If you send (password and username) to server B received from server A, then if you want to make it secure, you must provide some kind of security mechanism (interface) for it.
I would like you to take a look at Two-way Encryption: First you need to first save the passwords that you can get . Here you can save the key to encrypt certain value ie username and password .
for eample: - On server A, my username is user , and the password is pass , and my key is asdfasdhfkshf , which is the salt. In the above solution, you can use two-way encryption-encryption.
Whenever I retrieve (with javascript) my username and password , I get an encrypted version. let's say " sfdasdfaskuyfgdkgh2145 " and " 24sdf25asdf2asf42sad1fh ", which is encrypted using the asdfasdhfkshf key. Of course, no one can guess if they do not have a key, and the key is stored on server A.
Now we send this encrypted username and password to server B, which also stores the same key and code for decryption, and, of course, server B will be able to decrypt it back to user and pass .
Thus, the user can not guess which username and password can even view it.
But this only applies when you have implemented this interface or mechanism on server B.
Santosh linkha
source share