Mage2\User\Module::registerMiddleware PHP Method

registerMiddleware() public method

Register the middleware for the mage2 auth modules.
public registerMiddleware ( ) : void
return void
    public function registerMiddleware()
    {
        $router = $this->app['router'];
        $router->middleware('permission', Permission::class);
        $router->middleware('adminauth', AdminAuthenticate::class);
        $router->middleware('adminguest', RedirectIfAdminAuthenticated::class);
        $router->middleware('frontauth', FrontAuthenticate::class);
        $router->middleware('frontguest', RedirectIfFrontAuthenticated::class);
    }