Like the file CheckClientCredentials.php
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param mixed ...$scopes
* @return mixed
* @throws \Illuminate\Auth\AuthenticationException
*/
public function handle($request, Closure $next, ...$scopes)
{
$psr = (new DiactorosFactory)->createRequest($request);
try {
$psr = $this->server->validateAuthenticatedRequest($psr);
} catch (OAuthServerException $e) {
throw new AuthenticationException;
}
$this->validateScopes($psr, $scopes);
return $next($request);
}
why not add $psr to $request object when get authenticated client id in controller, like this
$psr = $this->server->validateAuthenticatedRequest($psr);
$request->client = $psr
this is a avaliable function
https://github.com/laravel/passport/issues/124
Heya, thanks for sending this in. I agree that this can be useful. I've marked this as a feature request. Feel free to send in a PR to master.
I'm going to close this as this is a duplicate of https://github.com/laravel/passport/issues/143. Please follow the discussion there.
Most helpful comment
Heya, thanks for sending this in. I agree that this can be useful. I've marked this as a feature request. Feel free to send in a PR to master.