简体   繁体   中英

Laravel Web and API login

I'm trying to build a platform where a Supplier can login to the platform, a normal web login.

But from the outside webshops can place orders using my REST API. Each webshop should be able to place an order but how would I go about authenticating those webshops?

Should I generate a sort of token for each webshop which they have to send in each request? Is it possible using JWT to issue a token to each shop that they will use for life? And so I know which shop is trying to create an order?

Looking very forward to your ideas. Thank you.

Since you've mentioned laravel in the topic, try Passport

Here is a nice introduction blog post about it:

https://mattstauffer.co/blog/introducing-laravel-passport

You can have it up and running within hours, good luck!

嗨,有很多软件包可以做到这一点,包括@veNuker提到的Passport我的建议使用Api-Guard易于使用

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM