0

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?

1 Answer 1

1
  • The ACS Endpoint is correct.
  • The SPOptions.ReturnUrl should be set to a location in your application where you want the user to end up after the authentication is complete.

You also need to set the AllowUnsolicitedAuthnResponse flag on the Idp to allow Idp initiated login.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.