插件认证

SAML Identity Provider

auth_samlidpEnovation Dev Team

  • Moodle 1.9–5.1
  • 更新 2024-02-24

This is a plugin that makes Moodle an Identity Provider site: other application can use Moodle as a login portal.
Requires SimpleSAMLphp, configured as IdP: https://simplesamlphp.org/docs/stable/simplesamlphp-idp.
This is a plugin that makes Moodle an Identity Provider site: other application can use Moodle as a login portal.
Requires SimpleSAMLphp, configured as IdP: https://simplesamlphp.org/docs/stable/simplesamlphp-idp.
ATTENTION: SimpleSAMLphp’s session store (config/config.php, ‘store.type’) MUST BE “sql” – “phpsession” will not work, “memcache” is not tested.
ATTENTION: SimpleSAMLphp’s baseurlpath (config/config.php, ‘baseurlpath’) MUST BE in the full URL format.
This instruction describes the situation, when we have two Moodle instances and use one of them as Identity Provider (IdP) server and another as Service Provider (SP). In our example we have:
samlsp.enovation.lan as Service Provider (SP)
idp.enovation.lan as Identity Provider(IDP)
First of all, you need to install Simple SAMLphp according to its instructions and locate it in the folder near IPD site installation directory. Since these must be on the same physical server.
In SimpleSAMLphp, add the plugin’s ./moodle directory to SimpleSAMLphp’ /modules directory.
Use standard Moodle installation mechanism to install the plugin to auth/samlidp on idp.enovation.lan.
In config/config.php configure session datastore:
‘store.type’         => ‘sql’,
‘store.sql.dsn’      => ‘mysql:dbname=idp_moodle31;host=localhost’,
‘store.sql.username’ => ‘your_db_username’,
‘store.sql.password’ => ‘your_db_password’,
‘store.sql.prefix’ => ‘SimpleSAMLphp’,
As one of the possible options please use Moodle DB credentials. SQLite should also work.
In SimpleSAMLphp config/authsources.php, add following to $config var:

返回插件目录