PHP-Open-Source-Saver / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
MIT License
729 stars 113 forks source link

how to use jwt auth with db table check (db less) #169

Closed rezanadimi72 closed 2 years ago

rezanadimi72 commented 2 years ago

Summary

how to use jwt auth without db table check (db less) for use in microservice

eschricker commented 2 years ago

This library is used to create JWTs. Did I understand you right, that you want to verify an existing JWT?

Have a look at this solution: https://github.com/PHP-Open-Source-Saver/jwt-auth/issues/80#issuecomment-1178647725

rezanadimi72 commented 2 years ago

@eschricker when me set a laravel route in jwt.check (this mean that route should be logined) this library send query to database to check user exist in table or not exist. i want to remove this database check and just check jwt validation

eschricker commented 2 years ago

Then you need to write your own middleware. You can use the referenced one as inspiration.