###################################################################### # User authentication via Drupal 8 using AuthDrupalSSO # AuthDrupalSSO v 0.8 (FORK), 2020-06-26 # // set to the domain the cookie needs to be set // note: since CORS and stuff this only works if the wikis are on a shared // domain needless to say $wgCookieDomain = '.drupal.lofihq'; // set some hash here to obfuscate the username $wgAuthDrupalSSO['config']['security_key'] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; // always set this to TRUE unless the wiki is on the same datebase // with a db prefix for example $wgAuthDrupalSSO['config']['use_ext_db'] = TRUE; // the drupal mysql host $wgAuthDrupalSSO['config']['mysql_host'] = 'drupal.lofihq'; // the drupal mysql username $wgAuthDrupalSSO['config']['mysql_username'] = 'drupal'; // the drupal mysql password $wgAuthDrupalSSO['config']['mysql_password'] = '3242fvds34'; // the drupal mysql database name $wgAuthDrupalSSO['config']['mysql_database'] = 'drupal_db'; // the drupal mysql database prefix $wgAuthDrupalSSO['config']['table_prefix'] = ''; // the table where drupal 8 stores the users $wgAuthDrupalSSO['config']['user_table'] = 'users_field_data'; // the table where drupal 8 stores the roles of users $wgAuthDrupalSSO['config']['roles_table'] = 'user__roles'; // this might come in handy if you have other sessionproviders going on the wiki $wgAuthDrupalSSO['config']['priority'] = 85; $wgAuthDrupalSSO['config']['replace_login'] = FALSE; // the drupal 8 login/logout url if replace_login is TRUE // this overwrittes the mediawiki login menu items $wgAuthDrupalSSO['config']['login_url'] = 'http://drupal.lofihq/user/login'; $wgAuthDrupalSSO['config']['logout_url'] = 'http://drupal.lofihq/user/logout'; // array of roles to allow login // enter the drupal 8 role machine names $wgAuthDrupalSSO['config']['allowed_roles'] = [ 'special_user', ]; // load the extension if ( !$wgCommandLineMode ) { wfLoadExtension ('AuthDrupalSSO'); }