diff options
author | Christoph Burschka | 2014-01-17 16:10:10 +0100 |
---|---|---|
committer | Christoph Burschka | 2014-01-17 16:10:10 +0100 |
commit | 045012f9b7619d441d8c5b5800519cb7ac6891b6 (patch) | |
tree | 4db383cb85c40b1fdc1b4b8c4413950d9134cedf /config.sample.php | |
parent | Apparently that didn't need to be encoded. (diff) | |
download | ejabberd-auth-php-045012f9b7619d441d8c5b5800519cb7ac6891b6.tar.gz |
Okay, the last patch was actually rubbish.
It turns out that you can't hope to bootstrap more
than one PHP-based software without messing stuff
up, particularly because they rely on global variables
without exception. If it is risky and unpredictable for
different systems, it is completely impossible with multiple
instances of the same.
Therefore, the ability to use multiple plugins (and the
accompanying config.php structure) has been removed. The
only plugin that can be used in conjunction with another
is session.
Diffstat (limited to 'config.sample.php')
-rw-r--r-- | config.sample.php | 68 |
1 files changed, 21 insertions, 47 deletions
diff --git a/config.sample.php b/config.sample.php index 59e0613..9c1746a 100644 --- a/config.sample.php +++ b/config.sample.php @@ -1,54 +1,28 @@ <?php /** - * config.php + * Copy this file to config.php. * - * Configure the Bridge plugins used by this authentication system. - * - * Example 1: Use a Drupal 8 site for all hosts. - * - * $config['*'][0] = [ - * 'plugin' => 'drupal8', - * 'config' => [ - * 'root_path' => '/path/to/drupal8', - * 'site' => 'default', - * ], - * ]; - * - * Example 2: Add a phpBB and MediaWiki subdomain (exact match): - * - * $config['forum.example.com'][0] = [ - * 'plugin' => 'phpbb30', - * 'config => ['root_path' => '/path/to/phpbb'], - * ]; - * $config['wiki.example.com'][0] = [ - * 'plugin' => 'mediawiki', - * 'config' => ['root_path' => '/path/to/mediawiki'], - * ]; - * - * Example 3: Allow session authentication (see plugins/session/README.md) - * - * $config['*'][0] = [ - * 'plugin' => 'phpbb30', - * 'config => ['root_path' => '/path/to/phpbb'], - * ]; - * $config['*'][1] = [ - * 'plugin' => 'session', - * 'config' => [ - * 'mysql' => [ - * 'dsn' => 'mysql:host=localhost;dbname=DATABASE;charset=utf8', - * 'username' => 'USER', - * 'password' => 'PASSWORD', - * 'table' => 'TABLE', - * ], - * 'plugin' => 'phpbb30' - * ], - * ]; + * plugin_conf will always require the `root_path` to the CMS you want to + * authenticate with. Some systems require additional information; Drupal + * needs the site directory (usually `default`). */ -$config['*'][0] = [ - 'plugin' => '', - 'config' => [ - 'root_path' => '', - ], +$config = [ + 'log_path' => 'logs/', + 'plugin' => 'PLUGIN', + 'plugin_conf' => [ + 'root_path' => '</path/to/site>', + ], + + // Remove this section if you are not using session authentication. + 'session' => [ + 'mysql' [ + 'dsn' => 'mysql:host=localhost;dbname=DATABASE;charset=utf8', + 'username' => 'USER', + 'password' => 'PASSWORD', + 'table' => 'TABLE', + ], + 'timeout' => 60, + ], ]; |