How to do authentication of own controller when using proxy server

Hi Team,
I am trying to do the integration with Grafana.
My requirement is that the user logins my application at first and then clicks the button ‘Grafana’, go to the Grafana dashboard.
Now I have set the proxy server and when enter the URL: https:///grafana. It will redirect to the grafana page. While there is no authentication. So everyone could see the dashboard.
My question is how to do the authentication of this redirect. In my own application, I have basecontroller to verify the user with X-XSRF-TOKEN. Is there any suggestion?
I am new to this. It’s so appreciated for any help.