plugin:authpdo:nextcloud
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:authpdo:nextcloud [2017-10-14 23:30] – [Plugin Configuration] 178.7.64.55 | plugin:authpdo:nextcloud [2019-02-18 01:04] (current) – reinhold | ||
---|---|---|---|
Line 2: | Line 2: | ||
======Nextcloud====== | ======Nextcloud====== | ||
- | Configuration for [[plugin: | + | Configuration for [[plugin: |
===== Scenario ===== | ===== Scenario ===== | ||
- | In this scenario, the intention is to permit the same users who are registered on Nextcloud (version 12) to make edits in the Wiki. The wiki is not open to all. Users must first have an account on Nextcloud, after which they can log into the wiki as well using the same credentials. | + | In this scenario, the intention is to permit the same users who are registered on Nextcloud (version 12 / 15) to make edits in the Wiki. The wiki is not open to all. Users must first have an account on Nextcloud, after which they can log into the wiki as well using the same credentials. |
- | In this example, the Nextcloud release is version 12, running on PostgreSQL. | + | In this example, the Nextcloud release is version 12, running on PostgreSQL. It was also tested on Nextcloud 15 with MariaDB / MySQL. |
Note that this does not give a ' | Note that this does not give a ' | ||
- | ===== Modification of core files ===== | ||
- | |||
- | **Note that this requires a modification of a Dokuwiki core file (/ | ||
- | |||
- | Specifically these changes need to be done to PassHash.class.php: | ||
- | |||
- | Somewhere around lines 54ff: | ||
- | '' | ||
- | $method = ' | ||
- | $salt = $hash; | ||
- | Sorry for bad formatting. | ||
- | This is the auto detection part that compares the first part of the hash string to the expected format with a regular expression. | ||
- | |||
- | Then much further below the actual hash function: | ||
- | |||
- | '' | ||
- | $currentVersion = 1; | ||
- | $options = [ | ||
- | ' | ||
- | ]; | ||
- | return $currentVersion . ' | ||
- | }'' | ||
- | |||
- | Sorry for bad formatting. | ||
- | |||
- | This is still untested, but should work I hope. | ||
===== Plugin Configuration ===== | ===== Plugin Configuration ===== | ||
//This guide is a work in progress// | //This guide is a work in progress// | ||
- | **Note that this requires a modification of a Dokuwiki core file (/ | + | **Note that Nextcloud |
In the AuthPDO section, configure the following: | In the AuthPDO section, configure the following: | ||
Line 50: | Line 24: | ||
| plugin> | | plugin> | ||
| plugin> | | plugin> | ||
- | | plugin> | + | | plugin> |
- | | plugin>authpdo> | + | |
- | | plugin> | + | SUBSTRING(password,3) AS hash, |
+ | | ||
+ | configvalue AS mail | ||
+ | FROM | ||
+ | oc_users LEFT JOIN oc_preferences | ||
+ | ON | ||
+ | oc_users.uid = oc_preferences.userid AND | ||
+ | oc_preferences.appid | ||
+ | oc_preferences.configkey = 'email' | ||
+ | WHERE | ||
+ | oc_users.uid = : | ||
+ | | plugin> | ||
| Other fields | | Other fields | ||
- | Note: Instead of using the same PostgreSQL | + | Note: Make sure not to add quotes around :user, as the authpdo plugin will automatically wrap strings like the user id in quotes. |
+ | |||
+ | Note2: Instead of using the same database | ||
In the Authentication section: | In the Authentication section: | ||
Line 62: | Line 49: | ||
| passcrypt | | passcrypt | ||
| defaultgroup | | defaultgroup | ||
- | | superuser | + | | superuser |
- | | manager | + | | manager |
| disableactions | | disableactions | ||
- | Note: " | + | Note: " |
plugin/authpdo/nextcloud.1508016629.txt.gz · Last modified: 2017-10-14 23:30 by 178.7.64.55