Reputation: 165
I am using the Mediawiki API to create accounts on my server #1, and when the account is created I want to automatically login to the Mediawiki that is installed on a different server #2.
Server #2 has a script on there to accept username and password in a query string and automatically login to the Mediawiki that is installed on it.
How can I pass the credentials from Server #1 to Server #2 without compromising security info?
$postfield = "action=login&lgname=user&lgpassword=pass&lgtoken={$token}&format=json";
$url = "http://wiki.sign.com/api.php"; // url to wiki's api
Upvotes: 0
Views: 113
Reputation: 28200
Use symmetric encryption (AES, for example): one server encrypts the API parameters with a secret key, sends the encrypted string, the other server decrypts them with the same key.
Upvotes: 1