org.apache.http.client.AuthenticationStrategy Java Examples
The following examples show how to use
org.apache.http.client.AuthenticationStrategy.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpConnectionManager.java From timer with Apache License 2.0 | 5 votes |
public static HttpClient getHtpClient(AuthenticationStrategy proxy) { RequestConfig requestConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD_STRICT).build(); CloseableHttpClient httpClient = HttpClients .custom() .setConnectionManager(cm) .setProxyAuthenticationStrategy(proxy) .setRedirectStrategy(new LaxRedirectStrategy()) .setDefaultRequestConfig(requestConfig) .build(); return httpClient; }
Example #2
Source File: ExchangeServiceBase.java From ews-java-api with MIT License | 5 votes |
private void initializeHttpClient() { Registry<ConnectionSocketFactory> registry = createConnectionSocketFactoryRegistry(); HttpClientConnectionManager httpConnectionManager = new BasicHttpClientConnectionManager(registry); AuthenticationStrategy authStrategy = new CookieProcessingTargetAuthenticationStrategy(); httpClient = HttpClients.custom() .setConnectionManager(httpConnectionManager) .setTargetAuthenticationStrategy(authStrategy) .build(); }
Example #3
Source File: ExchangeServiceBase.java From ews-java-api with MIT License | 5 votes |
private void initializeHttpPoolingClient() { Registry<ConnectionSocketFactory> registry = createConnectionSocketFactoryRegistry(); PoolingHttpClientConnectionManager httpConnectionManager = new PoolingHttpClientConnectionManager(registry); httpConnectionManager.setMaxTotal(maximumPoolingConnections); httpConnectionManager.setDefaultMaxPerRoute(maximumPoolingConnections); AuthenticationStrategy authStrategy = new CookieProcessingTargetAuthenticationStrategy(); httpPoolingClient = HttpClients.custom() .setConnectionManager(httpConnectionManager) .setTargetAuthenticationStrategy(authStrategy) .build(); }
Example #4
Source File: SimpleHttpClientFactoryBean.java From springboot-shiro-cas-mybatis with MIT License | 4 votes |
public AuthenticationStrategy getProxyAuthenticationStrategy() { return this.proxyAuthenticationStrategy; }
Example #5
Source File: SimpleHttpClientFactoryBean.java From springboot-shiro-cas-mybatis with MIT License | 4 votes |
public void setProxyAuthenticationStrategy(final AuthenticationStrategy proxyAuthenticationStrategy) { this.proxyAuthenticationStrategy = proxyAuthenticationStrategy; }
Example #6
Source File: MemoryHttpClientConfigurationStore.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Nullable @Override public AuthenticationStrategy getAuthenticationStrategy() { return authenticationStrategy; }
Example #7
Source File: MemoryHttpClientConfigurationStore.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Override public void setAuthenticationStrategy( @Nullable final AuthenticationStrategy authenticationStrategy) { this.authenticationStrategy = authenticationStrategy; }
Example #8
Source File: OrientHttpClientConfiguration.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Nullable @Override public AuthenticationStrategy getAuthenticationStrategy() { return authenticationStrategy; }
Example #9
Source File: OrientHttpClientConfiguration.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Override public void setAuthenticationStrategy( @Nullable final AuthenticationStrategy authenticationStrategy) { this.authenticationStrategy = authenticationStrategy; }
Example #10
Source File: HttpClientConfigurationData.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Nullable @Override public AuthenticationStrategy getAuthenticationStrategy() { return authenticationStrategy; }
Example #11
Source File: HttpClientConfigurationData.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Override public void setAuthenticationStrategy( @Nullable final AuthenticationStrategy authenticationStrategy) { this.authenticationStrategy = authenticationStrategy; }
Example #12
Source File: ConfigurationCustomizer.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
/** * Apply selected AuthenticationStrategy to plan. */ private void apply(final AuthenticationStrategy authenticationStrategy, final HttpClientPlan plan) { if (authenticationStrategy != null) { plan.getClient().setTargetAuthenticationStrategy(authenticationStrategy); } }
Example #13
Source File: HttpClientConfiguration.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
@Nullable AuthenticationStrategy getAuthenticationStrategy();
Example #14
Source File: HttpClientConfiguration.java From nexus-public with Eclipse Public License 1.0 | votes |
void setAuthenticationStrategy(@Nullable final AuthenticationStrategy authenticationStrategy);