File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -858,15 +858,14 @@ The Wordpress authentication middleware defines three routes:
858
858
859
859
A user can be logged in by sending it's username and password to the login endpoint (in JSON format).
860
860
The user can be logged out by sending a POST request with an empty body to the logout endpoint.
861
- In the authorization middleware you can use functions:
861
+ The middleware calls "wp-load.php" this allows you to use Wordpress functions in the authorization middleware, like :
862
862
863
863
- wp_get_current_user()
864
864
- is_user_logged_in()
865
865
- is_super_admin()
866
866
- user_can(wp_get_current_user(),'edit_posts');
867
867
868
- Play with it and let me know how you like it.. :-)
869
-
868
+ Note that the ` $_SESSION ` variable is not used by this middleware.
870
869
871
870
#### Basic authentication
872
871
You can’t perform that action at this time.
0 commit comments