Questions tagged as 'middleware'

0
answers

Is it possible to save document rum after removing it using a middleware in Mongoose?

I'm developing a system that requires some MongoDB documents to be kept in a database even if they have been removed, for historical purposes, so I created a plugin that inserts 3 fields: criadoEm atualizadoEm apagadoEm...
asked by 16.07.2018 / 21:06
0
answers

Send data via POST - MEAN STACK

When I pass a null value I get the backend function return, but when the value is not null, I get a bad request (400) error. See what I'm doing, what could be wrong? Error:    POST link 400 (Bad Request)       Failed to load link : In...
asked by 09.05.2018 / 20:11
1
answer

Laravel 5.4 has no Middleware / Authenticate.php

I'm following an example on jwt and Laravel 5 and I'm needing the Middleware / Authenticate.php file, but in my project there is no file (Laravel version is 5.4.36), I tried the php command artisan make: auth but it did not generate the file....
asked by 13.01.2018 / 15:49
1
answer

How to control routes using laravel middleware?

I have a system with the following routes '\' 'expenses' '\ register' '\ login' 'home' of these routes would like to leave only unauthenticated user '\' and '\ login', For this I changed the handle function of the RedirectIfAut...
asked by 19.12.2017 / 19:20
1
answer

Mongooose Middleware to encrypt password in Schema

I'm having a hard time getting a Middleware in my schema with mongoose. I put it as save and I'm getting the error that it is not a function when I call it. See below both codes: schema.pre('save', function(next) { console.log('this gets prin...
asked by 24.08.2017 / 19:53
1
answer

Auth :: guest () always returns true | Laravel 5.4

I'm using the features offered by laravel for authentication, but even if I logged on the auth :: guest () command returns true as if it were a guest. Follow the code for my middleware <?php namespace App\Http\Middleware; use Closu...
asked by 14.03.2017 / 15:49
0
answers

How to implement Design Pattern for a microservices proxy?

Soon we will make our applications through Middlewares , I know that systems authentication will be through OAuth2 , but I have the following question: Where should I begin to study related subjects and how could I adapt the applications...
asked by 09.12.2015 / 20:10