/** * Resolve the SAML entity ID from a SAML 1 request. * * @param request the request * * @return the entity ID, or null if it could not be resolved */ @Nullable protected String processSaml1Request(@Nonnull final org.opensaml.saml.saml1.core.Request request) { String entityId = null; if (request.getAttributeQuery() != null) { entityId = processSaml1AttributeQuery(request.getAttributeQuery()); if (entityId != null) { return entityId; } } if (request.getAuthorizationDecisionQuery() != null) { entityId = processSaml1AuthorizationDecisionQuery(request.getAuthorizationDecisionQuery()); if (entityId != null) { return entityId; } } return null; }
/** {@inheritDoc} */ @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) { if (!super.doPreExecute(profileRequestContext)) { return false; } final Request request = requestLookupStrategy.apply(profileRequestContext); if (request != null) { query = request.getAttributeQuery(); } if (query == null || query.getAttributeDesignators().isEmpty()) { log.debug("No AttributeDesignators found, nothing to do "); return false; } attributeContext = attributeContextLookupStrategy.apply(profileRequestContext); if (attributeContext == null) { log.debug("{} No attribute context, no attributes to filter", getLogPrefix()); return false; } if (attributeContext.getIdPAttributes().isEmpty()) { log.debug("{} No attributes to filter", getLogPrefix()); return false; } return true; }