You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26
Original file line number
Diff line number
Diff line change
@@ -664,6 +664,7 @@ You can enable the following middleware using the "middlewares" config parameter
664
664
- "apiKeyAuth": Support for "API Key Authentication"
665
665
- "apiKeyDbAuth": Support for "API Key Database Authentication"
666
666
- "dbAuth": Support for "Database Authentication"
667
+
- "wpAuth": Support for "Wordpress Authentication"
667
668
- "jwtAuth": Support for "JWT Authentication"
668
669
- "basicAuth": Support for "Basic Authentication"
669
670
- "reconnect": Reconnect to the database with different parameters
@@ -716,6 +717,10 @@ You can tune the middleware behavior using middleware specific configuration par
716
717
- "dbAuth.loginAfterRegistration": 1 or zero if registered users should be logged in after registration ("")
717
718
- "dbAuth.passwordLength": Minimum length that the password must have ("12")
718
719
- "dbAuth.sessionName": The name of the PHP session that is started ("")
720
+
- "wpAuth.mode": Set to "optional" if you want to allow anonymous access ("required")
721
+
- "wpAuth.wpDirectory": The folder/path where the Wordpress install can be found (".")
722
+
- "wpAuth.usernameFormField": The name of the form field that holds the username ("username")
723
+
- "wpAuth.passwordFormField": The name of the form field that holds the password ("password")
719
724
- "jwtAuth.mode": Set to "optional" if you want to allow anonymous access ("required")
720
725
- "jwtAuth.header": Name of the header containing the JWT token ("X-Authorization")
721
726
- "jwtAuth.leeway": The acceptable number of seconds of clock skew ("5")
@@ -841,6 +846,27 @@ For login operations, it is possible to use a view as the usersTable. Such view
841
846
842
847
However, views with joined tables are not insertable ([see issue 907](https://github.com/mevdschee/php-crud-api/issues/907) ). As a workaround, use the property ***loginTable*** to set a different reference table for login. The **usersTable** will still be set to the normal, insertable users table.
843
848
849
+
#### Wordpress authentication
850
+
851
+
The Wordpress authentication middleware defines three routes:
0 commit comments