public function authenticate(IRequest $request)
    {
        foreach ($this->clientAuthenticationMethods as $clientAuthenticationMethod) {
            if ($clientAuthenticationMethod->match($request)) {
                return $clientAuthenticationMethod->authenticate($request);
            }
        }

        throw new InvalidClientException('Invalid client authentication method.');
    }