protected Object determineAttributeValue(final String name, final Object attrValue) {
        val values = CollectionUtils.toCollection(attrValue, ArrayList.class);
        val result = attributeDefinitionStore.locateAttributeDefinition(name, AttributeDefinition.class);
        return result.map(defn -> defn.toAttributeValue(values))
            .orElseGet(() -> values.size() == 1 ? values.getFirst() : values);
    }
This is {@link OAuth20DefaultUserProfileViewRenderer}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/views/OAuth20DefaultUserProfileViewRenderer.java