示例#1
0
        public HtmlDocument get_saml_poster()
        {
            var document = new HtmlDocument();

            document.Title = "Saml Poster";

            var form = new FormTag(_urls.UrlFor <SamlEndpoint>(x => x.post_test_saml()));

            document.Push(form);
            var textarea = form.Add("textarea").Attr("name", SamlAuthenticationStrategy.SamlResponseKey).Attr("rows", 20).Attr("cols", "100");

            if (SamlResponse != null)
            {
                var xml = _writer.Write(SamlResponse);
                textarea.Attr("value", xml);

                SamlResponse = null;
            }

            form.Add("input").Attr("type", "submit").Attr("value", "Submit").Id("saml-submit");

            return(document);
        }