AuthBucket\OAuth2\GrantType\AbstractGrantTypeHandler::checkClientId PHP Method

checkClientId() protected method

Fetch client_id from authenticated token.
protected checkClientId ( ) : string
return string Supplied client_id from authenticated token
    protected function checkClientId()
    {
        $token = $this->tokenStorage->getToken();
        if ($token === null || !$token instanceof ClientToken) {
            throw new ServerErrorException(['error_description' => 'The authorization server encountered an unexpected condition that prevented it from fulfilling the request.']);
        }
        return $token->getClientId();
    }