I'm trying to figure out how to login user in standard Web Forms application and Owin enabled Web Forms application using IdP initiated request and Sustainsys SAML2 library.
I have IdP on Azure, I can send request and Azure can send POST with SAMLResponse to my ACS endpoint.
But I don't know ho to login user using this token. There is no example in Sustainsys documentation.
var spOptions = new SPOptions
{
EntityId = new EntityId("https://localhost:44317/Saml2"),
ReturnUrl = new Uri("https://localhost:44317/Saml2/Acs")
};
On Azure IdP Basic SAML Configuration
Identifier (Entity ID): https://localhost:44317/Saml2
Reply URL (Assertion Consumer Service URL): https://localhost:44317/Saml2/Acs
IdP works fine, I can see POST with token to my site. But I thought that there is some autologin feature. But seems that I was wrong.
So my questions are:
- Where should I set Return url to get response? Is ACS endpoind correct?
- How to process token and login user using handlers and Owin?