@@ -55,6 +55,15 @@ public class Saml2AuthnRequest : Saml2Request
5555        /// </summary> 
5656        public  Uri  AssertionConsumerServiceUrl  {  get ;  set ;  } 
5757
58+         /// <summary> 
59+         /// [Optional] 
60+         ///A URI reference that identifies a SAML protocol binding to be used when returning the <Response>  
61+         ///message.See[SAMLBind] for more information about protocol bindings and URI references defined  
62+         ///for them.This attribute is mutually exclusive with the AssertionConsumerServiceIndex attribute 
63+         ///and is typically accompanied by the AssertionConsumerServiceURL attribute. 
64+         /// </summary> 
65+         public  Uri  ProtocolBinding  {  get ;  set ;  } 
66+ 
5867        /// <summary> 
5968        /// [Optional] 
6069        /// If present, specifies a filter for possible responses. Such a query asks the question "What assertions 
@@ -110,6 +119,11 @@ protected override IEnumerable<XObject> GetXContent()
110119                yield  return  new  XAttribute ( Saml2Constants . Message . AssertionConsumerServiceURL ,  AssertionConsumerServiceUrl ) ; 
111120            } 
112121
122+             if  ( ProtocolBinding  !=  null ) 
123+             { 
124+                 yield  return  new  XAttribute ( Saml2Constants . Message . ProtocolBinding ,  ProtocolBinding ) ; 
125+             } 
126+ 
113127            if  ( Subject  !=  null ) 
114128            { 
115129                yield  return  Subject . ToXElement ( ) ; 
@@ -134,7 +148,9 @@ protected internal override void Read(string xml, bool validateXmlSignature = fa
134148
135149            IsPassive  =  XmlDocument . DocumentElement . Attributes [ Saml2Constants . Message . IsPassive ] . GetValueOrNull < bool > ( ) ; 
136150
137-             AssertionConsumerServiceUrl  =  XmlDocument . DocumentElement [ Saml2Constants . Message . AssertionConsumerServiceURL ,  Saml2Constants . AssertionNamespace . OriginalString ] . GetValueOrNull < Uri > ( ) ; 
151+             AssertionConsumerServiceUrl  =  XmlDocument . DocumentElement . Attributes [ Saml2Constants . Message . AssertionConsumerServiceURL ] . GetValueOrNull < Uri > ( ) ; 
152+ 
153+             ProtocolBinding  =  XmlDocument . DocumentElement . Attributes [ Saml2Constants . Message . ProtocolBinding ] . GetValueOrNull < Uri > ( ) ; 
138154
139155            Subject  =  XmlDocument . DocumentElement [ Saml2Constants . Message . Subject ,  Saml2Constants . AssertionNamespace . OriginalString ] . GetElementOrNull < Subject > ( ) ; 
140156
0 commit comments