autologin from website

autologin from website

بذریعہ Ilaria Di Russo -
جوابات کی تعداد: 4

Hi, I need help. How to generate autologin to Moodle from an external website (base on  .net  e web with json). ? Thanks

درجہ بندی کا اوسط: -
Ilaria Di Russo کے جواب میں

Re: autologin from website

بذریعہ Howard Miller -
Core developers کی تصویر Documentation writers کی تصویر Particularly helpful Moodlers کی تصویر Peer reviewers کی تصویر Plugin developers کی تصویر

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. 

درجہ بندی کا اوسط:Useful (1)
Howard Miller کے جواب میں

Re: autologin from website

بذریعہ Ilaria Di Russo -

Thanks a lot. Will try as you suggested. 

Ilaria Di Russo کے جواب میں

Re: autologin from website

بذریعہ Albert Ramsbottom -

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