I would like know how can I make an middelware authorization using my users table using mysql.
If true then return json content, if false then return json with error of autentication.
Some body knows how?
Some body haves an example?
Thaks in advance!
I often use the auraphp/Aura.Auth package for authentication, and in your case you could use the included PDO adapter to hook up to your mysql database. Then for authorization, have a look at this example authorization middleware. Instead of the generic example, you could check the user through Aura.Auth’s
Tanks @tflight I will try and I will tell you,