docs: protected WSFederationRegisteredService findAndValidateFederationRequestForRegisteredService(final Service targetService,
                                                                                                   final WSFederationRequest fedRequest) {
          val svc = getWsFederationRegisteredService(targetService);
  
          val idp = wsFederationRequestConfigurationContext.getCasProperties().getAuthn().getWsfedIdp().getIdp();
          if (StringUtils.isBlank(fedRequest.getWtrealm()) || !StringUtils.equals(fedRequest.getWtrealm(), svc.getRealm())) {
              LOGGER.warn("Realm [{}] is not authorized for matching service [{}]", fedRequest.getWtrealm(), svc);
              throw new UnauthorizedServiceException(UnauthorizedServiceException.CODE_UNAUTHZ_SERVICE, StringUtils.EMPTY);
          }
          if (!StringUtils.equals(idp.getRealm(), svc.getRealm())) {
              LOGGER.warn("Realm [{}] is not authorized for the identity provider realm [{}]", fedRequest.getWtrealm(), idp.getRealm());
              throw new UnauthorizedServiceException(UnauthorizedServiceException.CODE_UNAUTHZ_SERVICE, StringUtils.EMPTY);
          }
  
          return svc;
      }