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 ) ; } }
Decide attribute release based on service attribute policy .