final String target = openSAMLContext.getIdpUrl();
Endpoint endpoint = endpointGenerator.generateEndpoint(
SingleSignOnService.DEFAULT_ELEMENT_NAME, target, openSAMLContext.assertionConsumerUri());
AuthnRequest authnRequest = authnRequestGenerator.generateAuthnRequest(target, openSAMLContext.assertionConsumerUri());
Client client = getClientByRequest(authState);
String spEntityIdBy = client.getAttributes().get(CLIENT_SAML_ENTITY_NAME);
if (StringUtils.isNotEmpty(spEntityIdBy)) {
Scoping scoping = scopingBuilder.buildObject();
scoping.getRequesterIDs().add(createRequesterID(spEntityIdBy));
authnRequest.setScoping(scoping);
} else {
LOG.warn("For Client {} there is no key CLIENT_SAML_ENTITY_NAME configured to identify the SP entity name. NO SCOPING IS APPLIED", client.getClientId());
}
CriteriaSet criteriaSet = new CriteriaSet();