public class ClientCertificateAuthenticationProvider extends StandardAuthenticationProvider
SessionFactory factory = ...
Map<String, String> parameter = new HashMap<String, String>();
parameter.put(SessionParameter.ATOMPUB_URL, "https://localhost/cmis/atom");
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
parameter.put(SessionParameter.AUTHENTICATION_PROVIDER_CLASS, "org.apache.chemistry.opencmis.client.bindings.spi.ClientCertificateAuthenticationProvider");
parameter.put(SessionParameter.CLIENT_CERT_KEYFILE, "/path/to/mycert.jks");
parameter.put(SessionParameter.CLIENT_CERT_PASSPHRASE, "changeme");
...
Session session = factory.createSession(parameter);
WSSE_NAMESPACE, WSU_NAMESPACE| Constructor and Description |
|---|
ClientCertificateAuthenticationProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected SSLSocketFactory |
createSSLSocketFactory(String keyFile,
String passphrase) |
SSLSocketFactory |
getSSLSocketFactory() |
void |
setSession(BindingSession session)
Sets the
BindingSession the authentication provider lives in. |
addSessionParameterHeadersToFixedHeaders, createBasicAuthHeaderValue, getFixedHeaders, getHandleCookies, getHTTPHeaders, getSendBasicAuth, getSendBearerToken, getSendUsernameToken, getSOAPHeaders, putResponseHeadersgetBearerToken, getCsrfHeader, getHandlerResolver, getHostnameVerifier, getPassword, getProxyPassword, getProxyUser, getSession, getTrustManager, getUserpublic ClientCertificateAuthenticationProvider()
public void setSession(BindingSession session)
AbstractAuthenticationProviderBindingSession the authentication provider lives in.setSession in interface SessionAwareAuthenticationProvidersetSession in class StandardAuthenticationProviderpublic SSLSocketFactory getSSLSocketFactory()
getSSLSocketFactory in interface AuthenticationProvidergetSSLSocketFactory in class AbstractAuthenticationProviderprotected SSLSocketFactory createSSLSocketFactory(String keyFile, String passphrase)
Copyright © 2009–2017 The Apache Software Foundation. All rights reserved.