WordPress authentication middleware for snicco/http-routing
This middleware checks if a WordPress user is logged in
and will throw a 401 HTTPExcetion
if that's not the case.
composer require snicco/wp-auth-only-middleware
This middleware should be added on a per-route basis.
There are no configuration options.
use Snicco\Middleware\WPCap\AuthorizeWPCap;
$configurator->get('route1', '/route1', SomeController::class)
->middleware(AuthenticateWPUser::class);
This repository is a read-only split of the development repo of the Snicco project.
This is how you can contribute.
Please report issues in the Snicco monorepo.
If you discover a security vulnerability, please follow our disclosure procedure.