rest-api-with-lumen icon indicating copy to clipboard operation
rest-api-with-lumen copied to clipboard

JWT?

Open Zyles opened this issue 7 years ago • 3 comments

JWT support maybe?

https://github.com/tymondesigns/jwt-auth

Thanks.

Zyles avatar Jan 02 '18 05:01 Zyles

Laravel Passport uses firebase/jwt and lcobucci/jwt to generate tokens. Why you need another way of authentication?

ibpavlov avatar Jan 12 '18 19:01 ibpavlov

Oh it does? I will look more into it.

Using JWT to secure multiple API endpoints, so you can pass authentication between 2+ APIs.

Zyles avatar Jan 13 '18 09:01 Zyles

JWT is just a token format. Here all generated tokens are in JWT format. This means that they contain some information that is signed by the server.

OAUTH2 is a standard way of generating those tokens for different cases. For JWT Authentication for API to API there is no single way to do it, or standard. The simplest case is to generate JWT token from one API and use it from the other to authenticate, but then it depends on the authorization you want to give to your token. https://github.com/tymondesigns/jwt-auth is just a different authentication. You can use oauth2 for the same things you will use it.

You can see a good discussion about JwT and Oauth difference. https://stackoverflow.com/questions/39909419/jwt-vs-oauth-authentication

ibpavlov avatar Jan 17 '18 20:01 ibpavlov