This PR adds support for provider guards in the ClientRepository class of Laravel Passport for creating Personal Access Clients. The provider guard functionality allows developers to authenticate users using any provider they choose, or any custom provider.
The implementation involves adding a provider parameter to the createPersonalAccessClient method in the ClientRepository class. If the parameter is specified, the authentication will be done using the specified provider guard. If the parameter is not specified, the authentication will be done using the default provider guard.
This feature is useful for developers who want to use a custom authentication provider in their applications while still being able to create Personal Access Clients in Laravel Passport. It also allows for multi-authorizations in applications.
I have included tests to ensure that the functionality works as expected.
Thank you for your time and consideration in reviewing this PR.
This PR adds support for provider guards in the
ClientRepository
class of Laravel Passport for creating Personal Access Clients. The provider guard functionality allows developers to authenticate users using any provider they choose, or any custom provider.The implementation involves adding a
provider
parameter to thecreatePersonalAccessClient
method in theClientRepository
class. If the parameter is specified, the authentication will be done using the specified provider guard. If the parameter is not specified, the authentication will be done using the default provider guard.This feature is useful for developers who want to use a custom authentication provider in their applications while still being able to create Personal Access Clients in Laravel Passport. It also allows for multi-authorizations in applications.
I have included tests to ensure that the functionality works as expected.
Thank you for your time and consideration in reviewing this PR.
It complements the idea of (https://github.com/laravel/passport/pull/1606) and (https://github.com/laravel/passport/pull/1617)