Logging into Moodle via external site

删除回忆录丶 提交于 2019-12-06 02:25:45

Using external database authentication is probably the easiest to set up, especially if both systems are on the same server.

go to Site Admin > Plugins > Authentication > Manage Plugins -> Click the unhide button next to External Database

Then click on the settings and add the connection details for your database, name of the external table (or create a view if the data is from several tables) and add the field mappings.

http://docs.moodle.org/26/en/External_database_authentication

Alternatively, I would use the SimpleSAML plugin with LDAP - assuming you have an LDAP server - takes about a day to set up and mess about with the settings.

https://moodle.org/plugins/view.php?plugin=auth_saml

Having a similar issue, I am thinking of an approach that

  • let the main site create an extra database with enrolment information on a daily basis. I wanted to provide that as an SqLite file, but it appears that moodle external database plugin does not support SqLite database.

  • depending on the username and the access control logic on the main site show a menu "moodle"

  • if user clicks on "moodle" do a post request to moodle login with username and a secret token between moodle and the main site.

  • implement a simple authentification plugin for moodle which asks the main site for confirmation that the user is still logged in. It will use the shared secret token for this. If main site does not confirm that user is logged in then redirect to the login page of the main site.

But I am not sure if

  • the approach really works
  • the approach is suitable
  • the approach is already implemented by someone

I investigated SSO stuff like shiboleth but it appears pretty complicated and hard to implement in particular since our main site already has an authentification approach.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!