How to Read the SAML response from OKTA in asp.net framework(4.8) non mvc application

71 Views Asked by At

I have created ACS and im getting the response context.Response has the SAML response but is there any way to parse it using ITFoxtec.Identity.SAML? this is the code for MVC

        var httpRequest = Request.ToGenericHttpRequest(validate: true);
        var saml2AuthnResponse = new Saml2AuthnResponse(config);

        httpRequest.Binding.ReadSamlResponse(httpRequest, saml2AuthnResponse);

but for non mvc there is no method ToGenericHttpRequest(). Can anyone help me resolve this issue?

I have created ACS and im getting the response context.Response has the SAML response but is there any way to parse it using ITFoxtec.Identity.SAML? this is the code for MVC

        var httpRequest = Request.ToGenericHttpRequest(validate: true);
        var saml2AuthnResponse = new Saml2AuthnResponse(config);

        httpRequest.Binding.ReadSamlResponse(httpRequest, saml2AuthnResponse);

but for non mvc there is no method ToGenericHttpRequest(). I tried converting HTTP Request to other but did not help Can anyone help me resolve this issue?

1

There are 1 best solutions below