• Shubham Jain 103
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hi,

I have a rest resource class which returns the content from one of the VF pages and then i call this rest resource from site.com and embed the returned VF page content to static site.com pages. Everything was working fine until we need to access the page using site.com authenticated user, I am passing session id in Oauth Header which makes the rest resources class running as site logged in user but the VF page whose content I am fetching is still running as Public guest user context.

I tried below urls:-

vfPage=new PageReference('https://mysitedomain/myVFpage');  // it runs as guest user.
vfPage=new PageReference('https://mysitedomain/myVFpage?sid='+sid);  // session id that i am using to call the rest resource but still it runs as guest user.

vfPage=new PageReference('https://c.cs44.visual.force.com/apex/myVfpage?sid='+sessionId+'&nooverride=1&inline=-1');// this is throwing Maximum redirects (100) exceeded.i also tried setting Redirect property to false but still throwing exception.

Please let me know what do i need to pass to run the VF page as logged in user or any workaround to avoid "Maximum redirects" issue.

Thanks In Advance,
Shubham
Hi,

I have a rest resource class which returns the content from one of the VF pages and then i call this rest resource from site.com and embed the returned VF page content to static site.com pages. Everything was working fine until we need to access the page using site.com authenticated user, I am passing session id in Oauth Header which makes the rest resources class running as site logged in user but the VF page whose content I am fetching is still running as Public guest user context.

I tried below urls:-

vfPage=new PageReference('https://mysitedomain/myVFpage');  // it runs as guest user.
vfPage=new PageReference('https://mysitedomain/myVFpage?sid='+sid);  // session id that i am using to call the rest resource but still it runs as guest user.

vfPage=new PageReference('https://c.cs44.visual.force.com/apex/myVfpage?sid='+sessionId+'&nooverride=1&inline=-1');// this is throwing Maximum redirects (100) exceeded.i also tried setting Redirect property to false but still throwing exception.

Please let me know what do i need to pass to run the VF page as logged in user or any workaround to avoid "Maximum redirects" issue.

Thanks In Advance,
Shubham