Closed wendy-rose closed 2 years ago
Can you please clarify what you mean?
If you are asking how can you use this list of auth providers, then yes it is by using the api.auth middleware as you mentioned. For example, put all authenticated routes under a group with this middleware like so:
$api->group(['middleware' => ['api.auth']], function (Router $api) {
});
Can you please clarify what you mean?
If you are asking how can you use this list of auth providers, then yes it is by using the api.auth middleware as you mentioned. For example, put all authenticated routes under a group with this middleware like so:
$api->group(['middleware' => ['api.auth']], function (Router $api) { });
Thank you!My mean is that I want to use AdminAuthProvider, because of some interfaces need to use AdminAuthProvider, other interfaces need to ApiAuthProvider。So How to differentiated to use different of provider.
Can you please clarify what you mean?
If you are asking how can you use this list of auth providers, then yes it is by using the api.auth middleware as you mentioned. For example, put all authenticated routes under a group with this middleware like so:
$api->group(['middleware' => ['api.auth']], function (Router $api) { });
Thank you!My mean is that I want to use AdminAuthProvider, because of some interfaces need to use AdminAuthProvider, other interfaces need to ApiAuthProvider。So How to differentiated to use different of provider.
Actual Behaviour
I wrote about two service providers,then set to
config/api.auth
,now, I want to use
admin
, but how to use middleware? Useapi.auth
middleware?