use of org.apache.camel.component.linkedin.api.LinkedInOAuthRequestFilter in project camel by apache.
the class LinkedInComponent method createRequestFilter.
private LinkedInOAuthRequestFilter createRequestFilter(LinkedInConfiguration configuration) {
// validate configuration
configuration.validate();
final String[] enabledProtocols;
try {
// use default SSP to create supported non-SSL protocols list
final SSLContext sslContext = new SSLContextParameters().createSSLContext(getCamelContext());
enabledProtocols = sslContext.createSSLEngine().getEnabledProtocols();
} catch (GeneralSecurityException e) {
throw ObjectHelper.wrapRuntimeCamelException(e);
} catch (IOException e) {
throw ObjectHelper.wrapRuntimeCamelException(e);
}
return new LinkedInOAuthRequestFilter(getOAuthParams(configuration), configuration.getHttpParams(), configuration.isLazyAuth(), enabledProtocols);
}
Aggregations