@Override
    public String retrieveIdentifier(final WebContext webContext, final Client client) {
        return webContext.getRequestParameter(SamlProtocolConstants.PARAMETER_SAML_RELAY_STATE)
            .or(() -> contextProvider.getObject().getSessionStore().get(webContext, SAML2StateGenerator.SAML_RELAY_STATE_ATTRIBUTE).map(Object::toString))
            .orElse(StringUtils.EMPTY);
    }
This is {@link DelegatedClientSaml2SessionManager}.

@author Misagh Moayyed
@since 7.1.0
support/cas-server-support-pac4j-saml/src/main/java/org/apereo/cas/web/saml2/DelegatedClientSaml2SessionManager.java