public ChannelBinding GetChannelBinding()
        {
            if (this.message == null)
            {
                return(null);
            }
            ChannelBindingMessageProperty property = null;

            ChannelBindingMessageProperty.TryGet(this.message, out property);
            ChannelBinding channelBinding = null;

            if (property != null)
            {
                channelBinding = property.ChannelBinding;
            }
            return(channelBinding);
        }
Exemple #2
0
        public ChannelBinding GetChannelBinding()
        {
            if (Message == null)
            {
                return(null);
            }

            ChannelBindingMessageProperty.TryGet(Message, out ChannelBindingMessageProperty channelBindingMessageProperty);
            ChannelBinding channelBinding = null;

            if (channelBindingMessageProperty != null)
            {
                channelBinding = channelBindingMessageProperty.ChannelBinding;
            }

            return(channelBinding);
        }
Exemple #3
0
        private void AttachChannelBindingTokenIfFound()
        {
            ChannelBindingMessageProperty property = null;

            ChannelBindingMessageProperty.TryGet(base.InnerMessage, out property);
            if (((property != null) && (this.securityHeader.ElementContainer != null)) && (this.securityHeader.ElementContainer.EndorsingSupportingTokens != null))
            {
                foreach (SecurityToken token in this.securityHeader.ElementContainer.EndorsingSupportingTokens)
                {
                    ProviderBackedSecurityToken token2 = token as ProviderBackedSecurityToken;
                    if (token2 != null)
                    {
                        token2.ChannelBinding = property.ChannelBinding;
                    }
                }
            }
        }
        private void AttachChannelBindingTokenIfFound()
        {
            ChannelBindingMessageProperty.TryGet(InnerMessage, out ChannelBindingMessageProperty cbmp);

            if (cbmp != null)
            {
                if (_securityHeader.ElementContainer != null && _securityHeader.ElementContainer.EndorsingSupportingTokens != null)
                {
                    foreach (SecurityToken token in _securityHeader.ElementContainer.EndorsingSupportingTokens)
                    {
                        if (token is ProviderBackedSecurityToken pbst)
                        {
                            pbst.ChannelBinding = cbmp.ChannelBinding;
                        }
                    }
                }
            }
        }
        private void AttachChannelBindingTokenIfFound()
        {
            ChannelBindingMessageProperty cbmp = null;

            ChannelBindingMessageProperty.TryGet(this.InnerMessage, out cbmp);

            if (cbmp != null)
            {
                if (this.securityHeader.ElementContainer != null && this.securityHeader.ElementContainer.EndorsingSupportingTokens != null)
                {
                    foreach (SecurityToken token in this.securityHeader.ElementContainer.EndorsingSupportingTokens)
                    {
                        ProviderBackedSecurityToken pbst = token as ProviderBackedSecurityToken;
                        if (pbst != null)
                        {
                            pbst.ChannelBinding = cbmp.ChannelBinding;
                        }
                    }
                }
            }
        }