code: protected void decideAttributeReleaseBasedOnServiceAttributePolicy(final Map<String, List<Object>> attributes, final String attributeValue,
                                                                         final String attributeName, final RegisteredService service,
                                                                         final boolean doesAttributePolicyAllow) {
          if (StringUtils.isNotBlank(attributeValue)) {
              LOGGER.debug("Obtained [{}] as an authentication attribute", attributeName);
              if (doesAttributePolicyAllow) {
                  LOGGER.debug("Obtained [{}] is passed to the CAS validation payload", attributeName);
                  attributes.put(attributeName, CollectionUtils.wrap(attributeValue));
              } else {
                  LOGGER.debug("Attribute release policy for [{}] does not authorize the release of [{}]", service.getServiceId(), attributeName);
                  attributes.remove(attributeName);
              }
          } else {
              LOGGER.trace("[{}] is not available and will not be released to the validation response.", attributeName);
          }
      }
docs: Decide attribute release based on service attribute policy.
  
  @param attributes               the attributes
  @param attributeValue           the attribute value
  @param attributeName            the attribute name
  @param service                  the service
  @param doesAttributePolicyAllow does attribute policy allow release of this attribute?