Ejemplo n.º 1
0
        protected override Saml2Request Read(HttpRequest request, Saml2Request saml2RequestResponse, string messageName, bool validateXmlSignature)
        {
            if (request.Form.AllKeys.Contains(Saml2Constants.Message.RelayState))
            {
                RelayState = request.Form[Saml2Constants.Message.RelayState];
            }

            saml2RequestResponse.Read(Encoding.UTF8.GetString(Convert.FromBase64String(request.Form[messageName])), validateXmlSignature);
            XmlDocument = saml2RequestResponse.XmlDocument;
            return(saml2RequestResponse);
        }
Ejemplo n.º 2
0
        protected override Saml2Request Read(HttpRequest request, Saml2Request saml2RequestResponse, string messageName, bool validateXmlSignature)
        {
            if (!"GET".Equals(request.Method, StringComparison.InvariantCultureIgnoreCase))
            {
                throw new InvalidSaml2BindingException("Not HTTP GET Method.");
            }

            if (!request.Query.AllKeys.Contains(messageName))
            {
                throw new Saml2BindingException("HTTP Query String does not contain " + messageName);
            }

            saml2RequestResponse.Read(DecompressResponse(request.Query[messageName]), validateXmlSignature);
            XmlDocument = saml2RequestResponse.XmlDocument;
            return(saml2RequestResponse);
        }
        protected override Saml2Request Read(HttpRequest request, Saml2Request saml2RequestResponse, string messageName, bool validateXmlSignature)
        {
            if (!"POST".Equals(request.Method, StringComparison.InvariantCultureIgnoreCase))
            {
                throw new InvalidSaml2BindingException("Not HTTP POST Method.");
            }

            if (!request.Form.AllKeys.Contains(messageName))
            {
                throw new Saml2BindingException("HTTP Form does not contain " + messageName);
            }

            if (request.Form.AllKeys.Contains(Saml2Constants.Message.RelayState))
            {
                RelayState = request.Form[Saml2Constants.Message.RelayState];
            }

            saml2RequestResponse.Read(Encoding.UTF8.GetString(Convert.FromBase64String(request.Form[messageName])), validateXmlSignature);
            XmlDocument = saml2RequestResponse.XmlDocument;
            return(saml2RequestResponse);
        }
Ejemplo n.º 4
0
 protected override Saml2Request Read(HttpRequest request, Saml2Request saml2RequestResponse, string messageName, bool validateXmlSignature)
 {
     saml2RequestResponse.Read(Encoding.UTF8.GetString(Convert.FromBase64String(request.Form[messageName])), validateXmlSignature);
     XmlDocument = saml2RequestResponse.XmlDocument;
     return(saml2RequestResponse);
 }