final SAMLProtocolContext protocolCtx = messageContext.getSubcontext(SAMLProtocolContext.class); if (entityCtx == null || entityCtx.getEntityId() == null || entityCtx.getRole() == null) { log.info("{} SAML entity context class '{}' missing or did not contain an entityID or role", getLogPrefix(), entityContextClass.getName()); final EntityRoleCriterion roleCriterion = new EntityRoleCriterion(entityCtx.getRole()); if (protocolCriterion != null) { log.info("{} No metadata returned for {} in role {} with protocol {}", new Object[]{getLogPrefix(), entityCtx.getEntityId(), entityCtx.getRole(), protocolCriterion.getProtocol(),}); } else { log.info("{} No metadata returned for {} in role {}", new Object[]{getLogPrefix(), entityCtx.getEntityId(), entityCtx.getRole(),});