protected function getAuthorizationService($request, $response)
    {
        $service = $this->subject;
        if ($this->subject instanceof AuthorizationServiceProviderInterface) {
            $service = $this->subject->getAuthorizationService($request, $response);
        }

        if (!$service instanceof AuthorizationServiceInterface) {
            throw new RuntimeException(sprintf(
                'Invalid service returned from the provider. `%s` does not implement `%s`.',
                is_object($service) ? get_class($service) : gettype($service),
                AuthorizationServiceInterface::class
            ));
        }

        return $service;
    }