Mobile Moodle Alternate Logins

Re: Mobile Moodle Alternate Logins

by Juan Leyva -
Number of replies: 0
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

We are working in this for the next version:

See:

https://tracker.moodle.org/browse/MOBILE-113

Ways to solve this:

  • MDL-36114 +1 For this one, add a new method in auth plugins for automatically log-in the user in the remote SSO site. In Shibboleth we can do that using a curl call to the Apache protected directory. This method will be caled by login/token.php (the login page that uses the mobile app).
    I don't know if this can be generic, but some config options may be provided: SSO POST url, username field name, password field name, additional fields/params.. and of course, the expected response for success or failure
  • Custom Moodle Mobile plugin. A plugin that obtains a valid user token. It can call a custom WS inside your Moodle installation or another remote WS or similar for getting a valid Moodle token for the user.
  • Custom auth plugin that implements user_authenticated_hook (This method is called from authenticate_user_login() for all enabled auth plugins) so we can inject custom code via this plugin. This is like the previous one but at Moodle side. You have to implement the logic to validate the user and then generate a valid Moodle token for the user.

 

You can't work in the late one and build your custom auth plugin in Moodle for checking specials "auths" coming from the Mobile app (you can check the SERVER URL requested or the Referrer for detect logins coming from the mobile app