Re: svn commit: r1000365 - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings: CmisBindingF
Shouldn't NTLMAuthenticationProvider be named JavaNetAuthenticationProvider, or something like that? There's actually nothing NTLM-specific about it... Florent On Thu, Sep 23, 2010 at 11:11 AM, f...@apache.org wrote: Author: fmui Date: Thu Sep 23 09:11:58 2010 New Revision: 1000365 URL: http://svn.apache.org/viewvc?rev=1000365view=rev Log: added NTLM authentication provider Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java (with props) Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java?rev=1000365r1=1000364r2=1000365view=diff == --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java Thu Sep 23 09:11:58 2010 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingImpl; +import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider; import org.apache.chemistry.opencmis.commons.SessionParameter; import org.apache.chemistry.opencmis.commons.spi.CmisBinding; @@ -39,7 +40,10 @@ public final class CmisBindingFactory { /** Standard authentication provider class */ public static final String STANDARD_AUTHENTICATION_PROVIDER = org.apache.chemistry.opencmis.client.bindings.spi.StandardAuthenticationProvider; + /** NTLM authentication provider class */ + public static final String NTLM_AUTHENTICATION_PROVIDER = org.apache.chemistry.opencmis.client.bindings.spi.NTLMAuthenticationProvider; + private MapString, String defaults; /** Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java?rev=1000365view=auto == --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java (added) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java Thu Sep 23 09:11:58 2010 @@ -0,0 +1,106 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.chemistry.opencmis.client.bindings.spi; + +import java.net.Authenticator; +import java.net.PasswordAuthentication; +import java.util.List; +import java.util.Map; + +import org.w3c.dom.Element; + +/** + * NTLM authentication provider class. USE WITH CARE! + * + * This authentication provider sets a {...@link java.net.Authenticator} which will + * replace the current authenticator, if any. It will fail if this authenticator + * will be replaced by another part of the code. + * + * Since
Re: svn commit: r1000365 - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings: CmisBindingF
If there are no other use cases besides NTLM than I guess the current name is ok. Florent On Thu, Sep 23, 2010 at 4:40 PM, Florian Müller florian.muel...@alfresco.com wrote: Well, it's the only way to get Javas build-in NTLM support to kick in. It also supports HTTP basic authentication but you really shouldn't use it for that. We can rename the class but that would hide it's purpose. It should really only be used if NTLM is desperately needed. Florian On 23/09/2010 15:27, Florent Guillaume wrote: Shouldn't NTLMAuthenticationProvider be named JavaNetAuthenticationProvider, or something like that? There's actually nothing NTLM-specific about it... Florent On Thu, Sep 23, 2010 at 11:11 AM,f...@apache.org wrote: Author: fmui Date: Thu Sep 23 09:11:58 2010 New Revision: 1000365 URL: http://svn.apache.org/viewvc?rev=1000365view=rev Log: added NTLM authentication provider Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java (with props) Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java?rev=1000365r1=1000364r2=1000365view=diff == --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java (original) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/CmisBindingFactory.java Thu Sep 23 09:11:58 2010 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.Map; import org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingImpl; +import org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider; import org.apache.chemistry.opencmis.commons.SessionParameter; import org.apache.chemistry.opencmis.commons.spi.CmisBinding; @@ -39,7 +40,10 @@ public final class CmisBindingFactory { /** Standard authentication provider class */ public static final String STANDARD_AUTHENTICATION_PROVIDER = org.apache.chemistry.opencmis.client.bindings.spi.StandardAuthenticationProvider; + /** NTLM authentication provider class */ + public static final String NTLM_AUTHENTICATION_PROVIDER = org.apache.chemistry.opencmis.client.bindings.spi.NTLMAuthenticationProvider; + private MapString, String defaults; /** Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java?rev=1000365view=auto == --- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java (added) +++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/NTLMAuthenticationProvider.java Thu Sep 23 09:11:58 2010 @@ -0,0 +1,106 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package