code: protected Optional<SamlRegisteredServiceServiceProviderMetadataFacade> getSamlMetadataFacadeFor(final SamlRegisteredService registeredService,
                                                                                                      final RequestAbstractType authnRequest) {
          return SamlRegisteredServiceServiceProviderMetadataFacade.get(
              samlProfileHandlerConfigurationContext.getSamlRegisteredServiceCachingMetadataResolver(), registeredService, authnRequest);
      }
docs: Gets saml metadata adaptor for service.
  
  @param registeredService the registered service
  @param authnRequest      the authn request
  @return the saml metadata adaptor for service