Skip to content

Commit

Permalink
Fix HttpClientProxyCredentialProvider.getPasswordAuthentication
Browse files Browse the repository at this point in the history
Ensure that httpclientjava's
HttpClientProxyCredentialProvider.getCredentials(AuthScope) is called
with a correct AuthScope from getPasswordAuthentication.

Also update some target platform dependencies for the 2022-03 target to
use the most recently released versions of client5/core5.  Focus
particularly on what is required by the httpclient5 feature because
that's pulled into p2 and hence almost all installations, e.g., it does
not need to include org.apache.commons.logging and should use the latest
org.apache.commons.commons-codec rather than org.apache.commons.codec.

eclipse#76
eclipse#77
  • Loading branch information
merks committed Nov 14, 2023
1 parent bbf5ffa commit d4b15ae
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 628 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>

<product name="TimeServiceHost XmlRpc Zeroconf Discovery" uid="com.mycorp.examples.timeservice.xmlrpc.j8.product" version="1.1.0.qualifier" useFeatures="false" includeLaunchers="false">
<product name="TimeServiceHost XmlRpc Zeroconf Discovery" uid="com.mycorp.examples.timeservice.xmlrpc.j8.product" version="1.1.1.qualifier" useFeatures="false" includeLaunchers="false">

<configIni use="default">
</configIni>
Expand Down Expand Up @@ -37,7 +37,7 @@
<plugin id="com.mycorp.examples.timeservice.async"/>
<plugin id="com.mycorp.examples.timeservice.host"/>
<plugin id="javax.servlet"/>
<plugin id="org.apache.commons.codec"/>
<plugin id="org.apache.commons.commons-codec"/>
<plugin id="org.apache.commons.logging"/>
<plugin id="org.apache.felix.gogo.command"/>
<plugin id="org.apache.felix.gogo.runtime"/>
Expand Down Expand Up @@ -86,7 +86,7 @@
<configurations>
<plugin id="com.mycorp.examples.timeservice.host" autoStart="true" startLevel="0" />
<plugin id="javax.servlet" autoStart="true" startLevel="0" />
<plugin id="org.apache.commons.codec" autoStart="true" startLevel="0" />
<plugin id="org.apache.commons.commons-codec" autoStart="true" startLevel="0" />
<plugin id="org.apache.commons.logging" autoStart="true" startLevel="0" />
<plugin id="org.apache.felix.gogo.command" autoStart="true" startLevel="0" />
<plugin id="org.apache.felix.gogo.runtime" autoStart="true" startLevel="0" />
Expand Down
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<tycho-version>2.7.5</tycho-version>
<cbi-version>1.3.2</cbi-version>
<target-platform>2022-03</target-platform>
<execution-environment>JavaSE-17</execution-environment>
<eclipserun-repo>https://download.eclipse.org/eclipse/updates/latest/</eclipserun-repo>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<project.resources.sourceEncoding>ISO-8859-1</project.resources.sourceEncoding>
Expand Down Expand Up @@ -285,6 +286,7 @@
<version>1.0.0-SNAPSHOT</version>
</artifact>
</target>
<executionEnvironment>${execution-environment}</executionEnvironment>
<environments>
<environment>
<os>win32</os>
Expand Down Expand Up @@ -405,7 +407,7 @@
<url>${eclipserun-repo}</url>
</repository>
</repositories>
<executionEnvironment>JavaSE-11</executionEnvironment>
<executionEnvironment>${execution-environment}</executionEnvironment>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected NTCredentials getNTLMCredentials(Proxy proxy) {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
if (getRequestorType() == RequestorType.PROXY) {
Credentials credential = getCredentials(null); // TODO
Credentials credential = getCredentials(new AuthScope(getRequestingHost(), getRequestingPort()));
if (credential != null) {
return new PasswordAuthentication(credential.getUserName(), credential.getPassword());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.ecf.filetransfer.httpclient4.feature"
label="%featureName"
version="3.14.32.qualifier"
version="3.14.33.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
Expand Down Expand Up @@ -31,7 +31,7 @@
unpack="false"/>

<plugin
id="org.apache.commons.codec"
id="org.apache.commons.commons-codec"
download-size="0"
install-size="0"
version="0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</parent>
<groupId>org.eclipse.ecf</groupId>
<artifactId>org.eclipse.ecf.filetransfer.httpclient4.feature</artifactId>
<version>3.14.32-SNAPSHOT</version>
<version>3.14.33-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.ecf.filetransfer.httpclient45.feature"
label="%featureName"
version="1.1.100.qualifier"
version="1.1.101.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
Expand Down Expand Up @@ -39,7 +39,7 @@
unpack="false"/>

<plugin
id="org.apache.commons.codec"
id="org.apache.commons.commons-codec"
download-size="0"
install-size="0"
version="0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.eclipse.ecf.filetransfer.httpclient45.feature</artifactId>
<version>1.1.100-SNAPSHOT</version>
<version>1.1.101-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@
unpack="false"/>

<plugin
id="org.apache.commons.codec"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.apache.commons.logging"
id="org.apache.commons.commons-codec"
download-size="0"
install-size="0"
version="0.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ https://wiki.eclipse.org/ECF#OSGi_Remote_Services

<requires>
<import feature="org.eclipse.ecf.remoteservice.feature" version="2.1" match="compatible"/>
<import plugin="org.apache.commons.codec" version="1.6" match="compatible"/>
<import plugin="org.apache.commons.commons-codec" version="1.6" match="compatible"/>
<import plugin="org.apache.commons.logging" version="1.2.0" match="compatible"/>
<import plugin="org.apache.httpcomponents.httpclient" version="4.2" match="compatible"/>
<import plugin="org.apache.httpcomponents.httpcore" version="4.2" match="compatible"/>
Expand Down
Loading

0 comments on commit d4b15ae

Please sign in to comment.