Exemplo n.º 1
0
 private static void ConfigureAuthentication(HttpTransportBindingElement http, HttpTransportSecurity transportSecurity)
 {
     transportSecurity._clientCredentialType = HttpClientCredentialTypeHelper.MapToClientCredentialType(http.AuthenticationScheme);
     transportSecurity._proxyCredentialType  = HttpProxyCredentialTypeHelper.MapToProxyCredentialType(http.ProxyAuthenticationScheme);
     transportSecurity.Realm = http.Realm;
     transportSecurity._extendedProtectionPolicy = http.ExtendedProtectionPolicy;
 }
 private void ConfigureAuthentication(HttpTransportBindingElement http)
 {
     http.AuthenticationScheme      = HttpClientCredentialTypeHelper.MapToAuthenticationScheme(_clientCredentialType);
     http.ProxyAuthenticationScheme = HttpProxyCredentialTypeHelper.MapToAuthenticationScheme(_proxyCredentialType);
     http.Realm = Realm;
     http.ExtendedProtectionPolicy = ExtendedProtectionPolicy;
 }
Exemplo n.º 3
0
 private void ConfigureAuthentication(HttpTransportBindingElement http)
 {
     http.AuthenticationScheme = HttpClientCredentialTypeHelper.MapToAuthenticationScheme(_clientCredentialType);
     http.Realm = this.Realm;
     #region FromWCF
     http.ExtendedProtectionPolicy = this.extendedProtectionPolicy;
     #endregion
 }
Exemplo n.º 4
0
 internal static bool IsConfiguredTransportAuthentication(HttpTransportBindingElement http, HttpTransportSecurity transportSecurity)
 {
     if (HttpClientCredentialTypeHelper.MapToClientCredentialType(http.AuthenticationScheme) == HttpClientCredentialType.Certificate)
     {
         return(false);
     }
     ConfigureAuthentication(http, transportSecurity);
     return(true);
 }
Exemplo n.º 5
0
 private void ConfigureHttpsTransportSecurity()
 {
     this.httpsTransportBindingElement.AuthenticationScheme =
         HttpClientCredentialTypeHelper.MapToAuthenticationScheme(this.security.Transport.ClientCredentialType);
     this.httpsTransportBindingElement.ProxyAuthenticationScheme =
         HttpProxyCredentialTypeHelper.MapToAuthenticationScheme(this.security.Transport.ProxyCredentialType);
     this.httpsTransportBindingElement.Realm = this.security.Transport.Realm;
     this.httpsTransportBindingElement.RequireClientCertificate =
         this.security.Transport.ClientCredentialType == HttpClientCredentialType.Certificate;
 }
Exemplo n.º 6
0
        private void ConfigureHttpTransportSecurityCredentialOnly()
        {
            if (this.security.Transport.ClientCredentialType == HttpClientCredentialType.Certificate)
            {
                throw new InvalidOperationException(SR.CertificateUnsupportedForHttpTransportCredentialOnly);
            }

            this.httpTransportBindingElement.AuthenticationScheme =
                HttpClientCredentialTypeHelper.MapToAuthenticationScheme(this.security.Transport.ClientCredentialType);
            this.httpTransportBindingElement.ProxyAuthenticationScheme =
                HttpProxyCredentialTypeHelper.MapToAuthenticationScheme(this.security.Transport.ProxyCredentialType);
            this.httpTransportBindingElement.Realm = this.security.Transport.Realm;
        }
Exemplo n.º 7
0
 private static void ConfigureAuthentication(HttpTransportBindingElement http, HttpTransportSecurity transportSecurity)
 {
     transportSecurity._clientCredentialType = HttpClientCredentialTypeHelper.MapToClientCredentialType(http.AuthenticationScheme);
     transportSecurity.Realm = http.Realm;
 }
Exemplo n.º 8
0
 private void ConfigureAuthentication(HttpTransportBindingElement http)
 {
     http.AuthenticationScheme = HttpClientCredentialTypeHelper.MapToAuthenticationScheme(_clientCredentialType);
     http.Realm = this.Realm;
 }