use of com.sun.jersey.client.urlconnection.HTTPSProperties in project ORCID-Source by ORCID.
the class DevJerseyClientConfig method init.
public void init() {
SSLContext ctx = createSslContext();
HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(new HostnameVerifier() {
@Override
public boolean verify(String hostname, SSLSession sslSession) {
if (hostname.equals("localhost")) {
return true;
}
return false;
}
}, ctx));
}
use of com.sun.jersey.client.urlconnection.HTTPSProperties in project ORCID-Source by ORCID.
the class OrcidJerseyT2ClientConfig method afterPropertiesSet.
/**
* Invoked by a BeanFactory after it has set all bean properties supplied
* (and satisfied BeanFactoryAware and ApplicationContextAware).
* <p>
* This method allows the bean instance to perform initialization only
* possible when all bean properties have been set and to throw an exception
* in the event of misconfiguration.
*
* @throws Exception
* in the event of misconfiguration (such as failure to set an
* essential property) or if initialization fails.
*/
@Override
public void afterPropertiesSet() throws Exception {
SSLContext ctx = createSslContext();
HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
}, ctx));
}
use of com.sun.jersey.client.urlconnection.HTTPSProperties in project ORCID-Source by ORCID.
the class OrcidJerseyT2ClientOAuthConfig method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
SSLContext ctx = createSslContext();
HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
}, ctx));
}
Aggregations