jitbit/AspNetSaml

AspnetSaml SAmlresponse received null from Web form how to call samlconsumer.Can i use post method to send request

Opened this issue · 1 comments

Iam using aspnetsaml to SSO authentication page load i called "GetRedirectUrl" to called IDp and getting Samlrequest URL. where i need to call "Samlconsumer" after getredirect iam getting null from response. how to achieve asp.net web form

static void Redir(Response samlResponse)
{
//specify the SAML provider url here, aka "Endpoint"
var samlEndpoint = "https://saml.xxxx.com/idp/SSO.saml2";
AuthRequest request = new AuthRequest(
"https://www.xxxx.com/", //put your app's "unique ID" here
"https://localhost:xxxxx/Home/SamlConsume" //assertion Consumer Url - the redirect URL where the provider will send authenticated users
);
string url = request.GetRedirectUrl(samlEndpoint);
Saml.Response samlResponse = new Response(samlCertificate, Request.Form["SAMLResponse"]);--it is valid to call
Response.Redirect(url);
}

Does Request.Form["SAMLResponse"] work on webforms to get the response sent back by IDP as post? If not, how to grab the IDP response sent on post payload on asp.net webforms.