src/Guards/TokenGuard.php
public function client(Request $request)
    {
        if ($request->bearerToken()) {
            if (! $psr = $this->getPsrRequestViaBearerToken($request)) {
                return;
            }

            return $this->clients->findActive(
                $psr->getAttribute('oauth_client_id')
            );
        } elseif ($request->cookie(Passport::cookie())) {
            if ($token = $this->getTokenViaCookie($request)) {
                return $this->clients->findActive($token['aud']);
            }
        }
    }
public function client(Request $request)
    {
        if ($request->bearerToken()) {
            if (! $psr = $this->getPsrRequestViaBearerToken($request)) {
                return;
            }

            return $this->clients->findActive(
                $psr->getAttribute('oauth_client_id')
            );
        } elseif ($request->cookie(Passport::cookie())) {
            if ($token = $this->getTokenViaCookie($request)) {
                return $this->clients->findActive($token['aud']);
            }
        }
    }
public function client ( Request $ request ) { if ( $ request -> bearerToken ( ) ) { if ( ! $ psr = $ this -> getPsrRequestViaBearerToken ( $ request ) ) { return ; } return $ this -> clients -> findActive ( $ psr -> getAttribute ( 'oauth_client_id' ) ) ; } elseif ( $ request -> cookie ( Passport :: cookie ( ) ) ) { if ( $ token = $ this -> getTokenViaCookie ( $ request ) ) { return $ this -> clients -> findActive ( $ token [ 'aud' ] ) ; } } }
Get the client for the incoming request.

@param  \Illuminate\Http\Request  $request
@return mixed
Get the client for the incoming request .