Class HttpClientsConfiguration
java.lang.Object
org.qubership.atp.auth.springbootstarter.config.HttpClientsConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSsl context which ignore ssl verification.selfSignedSslContext(Provider<TrustManagerFactory> trustManagerFactoryProvider) SSL context into which self-signed certificates are uploaded.org.apache.http.client.HttpClientsslHttpClient(SSLContext sslContext) Http client with trusted ssl certificate.org.springframework.http.client.ClientHttpRequestFactorysslRequestFactory(org.apache.http.client.HttpClient sslHttpClient) RequestFactory with ignore ssl certificate verification.
-
Constructor Details
-
HttpClientsConfiguration
public HttpClientsConfiguration()
-
-
Method Details
-
sslHttpClient
Http client with trusted ssl certificate.- Parameters:
sslContext- SSLContext object- Returns:
- HttpClient object created and configured.
-
sslRequestFactory
@Bean public org.springframework.http.client.ClientHttpRequestFactory sslRequestFactory(org.apache.http.client.HttpClient sslHttpClient) RequestFactory with ignore ssl certificate verification.- Parameters:
sslHttpClient- HttpClient object- Returns:
- ClientHttpRequestFactory factory created and configured.
-
ignoreVerifySslContext
@Bean @ConditionalOnProperty(value="atp-auth.ssl.certificate.verify", havingValue="false", matchIfMissing=true) public SSLContext ignoreVerifySslContext() throws KeyStoreException, NoSuchAlgorithmException, KeyManagementExceptionSsl context which ignore ssl verification.- Returns:
- SSLContext object created and configured.
- Throws:
KeyStoreExceptionNoSuchAlgorithmExceptionKeyManagementException
-
selfSignedSslContext
@Bean @ConditionalOnProperty(value="atp-auth.ssl.certificate.verify", matchIfMissing=false) public SSLContext selfSignedSslContext(Provider<TrustManagerFactory> trustManagerFactoryProvider) throws Exception SSL context into which self-signed certificates are uploaded.- Parameters:
trustManagerFactoryProvider- Provider of TrustManagerFactory bean- Returns:
- SSLContext object created and configured.
- Throws:
Exception
-