+ Start a Discussion
Natalya MurphyNatalya Murphy 

Send authentication to Visualforce page?

Is there a way to send user authentication information as part of the request URL to a VisualForce page?  The page I'm developing has a report chart on it, so I can't just rely on the Guest User profile since it doesn't allow running of reports.   I'd like to create a user with a very restricted profile and access to a small number of reports, and then be able to render the Visualforce page as if that user was logged in.  I don't want the site visitor to have to provide login credentials.     
Igor Androsov 5Igor Androsov 5
I do not think you can do that in a secure manner. I will suggest a bit different solution, using reporting analytics API and VFP you should be able to include any report and expose that via Site for Guest user. You will need to add that VF page to Site profile and also add CRUD for objects used by the report for the Guest profile. Keep controller class without sharing. Below couple links resources to help: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_analytics_reportChart.htm
https://developer.salesforce.com/blogs/developer-relations/2013/09/using-the-salesforce-analytics-api-on-a-visualforce-page.html