Hide field to public role only

I need to expose my user-permissions endpoint to the public however some data on these records i only want accessible to authenticated users. Is there a way to hide a field in the api based on whether the request is authenticated or not?

This topic has been created from a Discord post (1217604319919210516) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord