@Override
                public String getEntityIdFrom(final SamlRegisteredServiceCachingMetadataResolver resolver, final String attributeValue) {
                    val openSamlConfigBean = resolver.getOpenSamlConfigBean();
                    val sessionStore = openSamlConfigBean.getApplicationContext()
                        .getBean("samlIdPDistributedSessionStore", SessionStore.class);
                    val authnRequest = SamlIdPSessionManager.of(resolver.getOpenSamlConfigBean(), sessionStore)
                        .fetch(RequestAbstractType.class, attributeValue);
                    openSamlConfigBean.logObject(authnRequest);
                    return SamlIdPUtils.getIssuerFromSamlObject(authnRequest);
                }
Get the saml2 request or entity id as a service attribute.

@param registeredService the registered service
@param service           the service
@return true/false
support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/SamlIdPServicesManagerRegisteredServiceLocator.java