/** {@inheritDoc} */ @Override @Nullable public List<IdPAttributeValue<?>> apply(@Nullable final ProfileRequestContext prc) { final SubjectContext cs = scLookupStrategy.apply(prc); final List<IdPAttributeValue<?>> results = new ArrayList<>(1); for (final Subject subject : cs.getSubjects()) { for (final Principal principal : subject.getPrincipals()) { final List<IdPAttributeValue<?>> values = attributesValueFunction.apply(principal); if ((null != values) && !values.isEmpty()) { results.addAll(values); } } } if (results.isEmpty()) { log.info("{} generated no values, attribute no resolved.", getLogPrefix()); return null; } log.debug("{} Generated {} values.", getLogPrefix(), results.size()); log.trace("{} Values:", getLogPrefix(), results); return results; }
log.warn("{} Could not locate SubjectContext", getLogPrefix()); } else { final List<Subject> subjects = sc.getSubjects(); if (null == subjects) { log.warn("{} Could not locate Subjects", getLogPrefix());
log.debug("{} Could not locate SubjectContext", getLogPrefix()); } else { final List<Subject> subjects = sc.getSubjects(); if (null == subjects) { log.debug("{} Could not locate Subjects", getLogPrefix());