mercredi 5 décembre 2018

Laravel Passport - How do you disallow users from generating clients?

Passport provides a convenient way of registering routes for users to create their own clients by calling Passport::routes(); in the AuthServiceProvider.

I do not wish to allow my users to create clients, as I only want to manually create clients using php artisan passport:client command, as I only need passport for machine-to-machine authentication for internal services.

How do I customize routes for Passport to only expose the necessary routes for passing a client id and secret to gain an access_token? I understand that I can dig into the framework and expose my own routes to a series of \Laravel\Passport\Http\Controllers\PassportController@action, I just didn't know if that was the only way or the preferred way.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2EfhXXU
via IFTTT

Aucun commentaire:

Enregistrer un commentaire