public function getBySession(SessionEntity $session)
    {
        $result = $this->getConnection()->table('oauth_clients')
                ->select(
                    'oauth_clients.id as id',
                    'oauth_clients.secret as secret',
                    'oauth_clients.name as name')
                ->join('oauth_sessions', 'oauth_sessions.client_id', '=', 'oauth_clients.id')
                ->where('oauth_sessions.id', '=', $session->getId())
                ->first();

        if (is_null($result)) {
            return;
        }

        return $this->hydrateEntity($result);
    }
public function getBySession(SessionEntity $session)
    {
        $result = $this->getConnection()->table('oauth_clients')
                ->select(
                    'oauth_clients.id as id',
                    'oauth_clients.secret as secret',
                    'oauth_clients.name as name')
                ->join('oauth_sessions', 'oauth_sessions.client_id', '=', 'oauth_clients.id')
                ->where('oauth_sessions.id', '=', $session->getId())
                ->first();

        if (is_null($result)) {
            return;
        }

        return $this->hydrateEntity($result);
    }
public function getBySession ( SessionEntity $ session ) { $ result = $ this -> getConnection ( ) -> table ( 'oauth_clients' ) -> select ( 'oauth_clients.id as id' , 'oauth_clients.secret as secret' , 'oauth_clients.name as name' ) -> join ( 'oauth_sessions' , 'oauth_sessions.client_id' , '=' , 'oauth_clients.id' ) -> where ( 'oauth_sessions.id' , '=' , $ session -> getId ( ) ) -> first ( ) ; if ( is_null ( $ result ) ) { return ; } return $ this -> hydrateEntity ( $ result ) ; }
Get the client associated with a session.

@param  \League\OAuth2\Server\Entity\SessionEntity $session The session

@return null|\League\OAuth2\Server\Entity\ClientEntity
Get the client associated with a session .