Access restapi resource magic variables within an app?

We have a resource that uses a custom auth workflow. It consists of an initial request containing a username, password, client id, client secret, and granttype. Upon successful request, the response contains the access token along with the username, api version, and permissions scope for the requested user.

We would like to be able to display the username, API version, and scope within an app; in the header for example.

Is this currently possible?

If this falls into the feature request category, I understand that there may be some security implications of being able to access all the resource auth data within an app. Maybe certain values could be declared as private so that they wouldn't be accessible.

Hello

You have access to all response data. Use queryname.data or queryname.metadata (contains headers) depends on your need.

@bqman7 Good point. I did look through the metadata but I couldn't find the information I was looking for. I guess I could add the information that I need to the request headers.