Hi, I need help. How to generate autologin to Moodle from an external website (base on .net e web with json). ? Thanks
If you have the username and password, you can just "fake" Moodle's login form. Something like this...
<form action="http://your.site/moodle/login/index.php" method="post">
<input type="hidden" name="username" value="USERNAME" />
<input type="hidden" name="password" value="PASSWORD" />
<input type="submit" value="Click to go to Moodle" />
</form>
Generate this form in your website sticking in the correct values for the Moodle path, username and password.
If you don't have the password (and in a secure application you should not) then you need to implement some form of proper SSO and this isn't trivial.
Thanks a lot. Will try as you suggested.
As Howard states, the only way to do this properly would be to have some form of SSO such as CAS.
Make sure you have https at both ends, otherwise you will be sending your admin details in clear text over the web
Cheers
Done . Thanks