I am trying to write a program that will login a user programatically into a ArcGIS portal.
Here is my scenario:
User logs in to application A, user clicks a link to the ArcGIS portal - I do not want them to have to login to the portal when they click that link because that have already logged into application A.
I would like:
User logs in to application A, user clicks a button containing the portal link as an argument and redirects to application B. Application B logs the user into portal and redirects them with the link from application A - the user is redirected without being prompted to login.
This code gets me a token from the rest service - I try to store it has a cookie but it doesn't persist.
I have also tried using a C# web request and a credential cache to generate the credentials AND using the .NET proxy to try and pass through my portal URL and store the credentials server side but I didn't save the code I was using.