Questions tagged as 'middleware'

2
answers

What are middleware in NodeJS?

What are middleware and what is its importance to the Node platform?     
asked by 18.05.2015 / 16:41
1
answer

What is and what is middleware for?

I see in some courses that some people highlight something like a middleware, example : middleware, authentication ). I found the explanation rather superficial because it was not the focus of the course, I did not really understand what middl...
asked by 27.06.2018 / 14:01
3
answers

Route access control - Laravel 5.1

I have some views that only clients can access, and some that only administrators can access. What I defined in the case is the client_id, which if "1" is an administrator and if it is any other client. I control this with 2 Middleware locally,...
asked by 27.01.2016 / 15:31
0
answers

What is the difference between Guard () and Middleware ()?

I've been noticing that both do basically the same thing ... I may have misunderstood, but what would be the difference between the two in Laravel?     
asked by 03.09.2017 / 22:06
1
answer

Nested Middlewares

I'd like to allow access to a few pages only if the user is logged in. I did so: Route::group( ['middleware' => 'usuario'], function (){ /* Minhas páginas */ }); So far so good, but I'd like to check if the password is already the...
asked by 29.11.2017 / 19:54
1
answer

Object.anonymous (Express + Middleware)

> > node index.js C:\Users\cpsep\Projetos\nodejs\semparar\node_modules\express\lib\express.js:107 > throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please >...
asked by 09.08.2017 / 17:17
2
answers

How to redirect the authenticated user to a specific page?

I am restricting the laravel registration page only to be shown or accessed after the login. A friend of the stackoverflow group told me they could be doing it this way: public function __construct() { $this->middleware('guest', ['ex...
asked by 20.03.2016 / 03:38
2
answers

Python calling super () on a class that does not implement inheritance

I'm developing some middlewares and delving into the Django source code I came across the following: class MiddlewareMixin: def __init__(self, get_response=None): self.get_response = get_response super().__init__() de...
asked by 05.08.2018 / 21:16
1
answer

Change document after post-save middleware in mongoose

I'm working with mongoose.js and I'm going to need to, after saving the document in the database, I get attribute of that document. From what I understood in the mongoose documentation itself, I realized that I could do this using a middleware...
asked by 01.06.2017 / 20:37
0
answers

How to pass more than one Can middleware on laravel?

Hello, I need to pass several defines to a route, for example admin, annual plan, and new-user, when I put can in the middleware it only identifies the first parameter. AuthServiceProvider.php Gate::define("new-user","App\Policies\ACLChecke...
asked by 11.10.2018 / 23:20