mercredi 22 janvier 2020

Which feature of laravel passport i will use to secure api consumtion req from 3rd pary website

Suppose i have a laravel 5.8 app which is used for a erp (domain.com). There are different type of clients. Each client has their own panel(using subdomain.domain.com) from which they can manage roles, users etc. Few clients have website (front end-made with vuejs-client1web.com,client2web.com etc)which shows few details from erp DB. My question is how can i use passport to send data to website? Passport has password client and personal client. But the website doesn't have password. Moreover each of my client has different package. Ex. Client-1 has package 'simple' which contains emp attendance,emp salary mgmt, etc. So, on his website we have to show today's present emp, all emp list etc. But client-2 has another package and has more modules. How can i manage permission to different api based on their package? How can i validate that the api request is from my client's website. Website may has post/put request as few clients want online registration for (for recruit emp)/contact form. What i did to mobile app: I have mobile app too for all. I can validate mobile api using users' username and password when they log in. But how can validate website request? How can use same api for both mobile app and website. For ex. i have a api method which send all employee's few info on mobile. The website may require this pai too to show employee's info to public. And i think it wouldn't be better to make 2 api for same task, right? How can use same api for mobile, own app, and website? Thanks in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire