Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mevdschee committed Aug 3, 2023
1 parent 48b575f commit 5017711
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -858,15 +858,14 @@ The Wordpress authentication middleware defines three routes:

A user can be logged in by sending it's username and password to the login endpoint (in JSON format).
The user can be logged out by sending a POST request with an empty body to the logout endpoint.
In the authorization middleware you can use functions:
The middleware calls "wp-load.php" this allows you to use Wordpress functions in the authorization middleware, like:

- wp_get_current_user()
- is_user_logged_in()
- is_super_admin()
- user_can(wp_get_current_user(),'edit_posts');

Play with it and let me know how you like it.. :-)

Note that the `$_SESSION` variable is not used by this middleware.

#### Basic authentication

Expand Down

0 comments on commit 5017711

Please sign in to comment.