Wordpress identity store (#67)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
- [SQL](backends/sql.md)
|
||||
- [REST](backends/rest.md)
|
||||
- [Google Firebase](backends/firebase.md)
|
||||
- [Wordpress](backends/wordpress.md)
|
||||
- Notifications
|
||||
- Handlers
|
||||
- [Basic](threepids/notifications/basic-handler.md)
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
- [Samba / Active Directory / LDAP](ldap.md)
|
||||
- [SQL Databases](sql.md)
|
||||
- [Website / Web service / Web app](rest.md)
|
||||
- [Google Firebase](firebase.md)
|
||||
- [Google Firebase](firebase.md)
|
||||
- [Wordpress](wordpress.md)
|
||||
55
docs/backends/wordpress.md
Normal file
55
docs/backends/wordpress.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Wordpress
|
||||
This Identity store allows you to use user accounts registered on your Wordpress setup.
|
||||
Two types of connections are required for full support:
|
||||
- [REST API](https://developer.wordpress.org/rest-api/) with JWT authentication
|
||||
- Direct SQL access
|
||||
|
||||
This Identity store supports the following features:
|
||||
- [Authentication](../features/authentication.md)
|
||||
- [Directory](../features/directory-users.md)
|
||||
- [Identity](../features/identity.md)
|
||||
|
||||
## Requirements
|
||||
- [Wordpress](https://wordpress.org/download/) >= 4.4
|
||||
- Permalink structure set to `Post Name`
|
||||
- [JWT Auth plugin for REST API](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)
|
||||
- SQL Credentials to the Wordpress Database
|
||||
|
||||
## Configuration
|
||||
### Wordpress
|
||||
#### JWT Auth
|
||||
Set a JWT secret into `wp-config.php` like so:
|
||||
```
|
||||
define('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');
|
||||
```
|
||||
`your-top-secret-key` should be set to a randomly generated value which is kept secret.
|
||||
|
||||
#### Rewrite of `index.php`
|
||||
Wordpress is normally configured with rewrite of `index.php` so it does not appear in URLs.
|
||||
If this is not the case for your installation, the mxisd URL will need to be appended with `/index.php`
|
||||
|
||||
### mxisd
|
||||
Enable in the configuration:
|
||||
```
|
||||
wordpress.enabled: true
|
||||
```
|
||||
Configure the URL to your Wordpress installation - see above about added `/index.php`:
|
||||
```
|
||||
wordpress.rest.base: 'http://localhost:8080'
|
||||
```
|
||||
Configure the SQL connection to your Wordpress database:
|
||||
```
|
||||
wordpress.sql.connection: '//127.0.0.1/wordpress?user=root&password=example'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
By default, MySQL database is expected. If you use another database, use:
|
||||
```
|
||||
wordpress.sql.type: 'jdbc-scheme'
|
||||
```
|
||||
With possible values:
|
||||
- `mysql`
|
||||
- `mariadb`
|
||||
- `postgresql`
|
||||
- `sqlite`
|
||||
@@ -115,8 +115,8 @@ Steps of user authentication using a 3PID:
|
||||
- Homeserver
|
||||
- Compatible Identity backends:
|
||||
- LDAP
|
||||
- SQL
|
||||
- REST
|
||||
- Wordpress
|
||||
|
||||
### Configuration
|
||||
|
||||
@@ -160,12 +160,3 @@ value is the base internal URL of the Homeserver, without any /_matrix/.. or tra
|
||||
|
||||
#### Backends
|
||||
The Backends should be configured as described in the documentation of the [Directory User](directory-users.md) feature.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -219,6 +219,9 @@ For each query, `type` can be used to tell mxisd how to process the ID column:
|
||||
#### REST
|
||||
See the [dedicated document](../backends/rest.md)
|
||||
|
||||
#### Wordpress
|
||||
See the [dedicated document](../backends/wordpress.md)
|
||||
|
||||
## Next steps
|
||||
### Homeserver results
|
||||
You can configure if the Homeserver should be queried at all when doing a directory search.
|
||||
|
||||
@@ -143,3 +143,4 @@ Use your Identity stores:
|
||||
- [SQL Database](backends/sql.md)
|
||||
- [Website / Web service / Web app](backends/rest.md)
|
||||
- [Google Firebase](backends/firebase.md)
|
||||
- [Wordpress](backends/wordpress.md)
|
||||
|
||||
Reference in New Issue
Block a user