CriteriaSet criteriaSet = new CriteriaSet();
criteriaSet.add(new EntityIDCriteria(openSAMLContext.entityId()));
criteriaSet.add(new UsageCriteria(UsageType.SIGNING));
try {
Credential signingCredential = openSAMLContext.keyStoreCredentialResolver().resolveSingle(criteriaSet);
String relayState = authState;
LOG.debug("Sending authnRequest to {}", target);
openSAMLContext.samlMessageHandler().sendSAMLMessage(authnRequest, endpoint, response, relayState, signingCredential);
} catch (MessageEncodingException mee) {
LOG.error("Could not send authnRequest to Identity Provider.", mee);