Skip to content

Commit

Permalink
Fix to basicauth component.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
scottslewis committed Nov 30, 2020
1 parent cba0d43 commit c093598
Show file tree
Hide file tree
Showing 39 changed files with 19 additions and 20 deletions.
Binary file modified build/artifacts.jar
Binary file not shown.
Binary file modified build/content.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 15 additions & 15 deletions build/karaf-features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/com.fasterxml.jackson.module.jackson-module-jaxb-annotations_2.10.1.jar
</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs_1.5.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs_1.5.0.202011292111.jar
</bundle>

<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/jakarta.xml.bind-api_2.3.2.jar
Expand All @@ -35,15 +35,15 @@
description="ECF JaxRS Distribution Provider Server Support. See https://github.com/ECF/JaxRSProviders">
<feature>http</feature>
<feature version="1.14.1">ecf-rs-distribution-jaxrs</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs.server_1.10.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs.server_1.10.0.202011292111.jar
</bundle>
</feature>

<feature name="ecf-rs-distribution-jaxrs-client"
version="1.14.1"
description="ECF JaxRS Distribution Provider Client Support. See https://github.com/ECF/JaxRSProviders">
<feature version="1.14.1">ecf-rs-distribution-jaxrs</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs.client_1.7.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs.client_1.7.0.202011292111.jar
</bundle>
</feature>

Expand Down Expand Up @@ -106,23 +106,23 @@
</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.glassfish.jersey.containers.jersey-container-servlet-core_2.30.1.jar
</bundle>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jersey.server_1.9.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jersey.server_1.9.0.202011292111.jar
</bundle>
</feature>

<feature name="ecf-rs-distribution-jersey-server-basicauth-ext"
version="1.14.1"
description="ECF Jersey Server Basic Auth Extension Example. See https://github.com/ECF/JaxRSProviders">
<feature version="1.14.1">ecf-rs-distribution-jersey-server</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.jersey.server.basicauth_1.0.1.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.jersey.server.basicauth_1.0.1.202011292111.jar
</bundle>
</feature>

<feature name="ecf-rs-distribution-jersey-client-basicauth-ext"
version="1.14.1"
description="ECF Jersey Client Distribution Provider Basic Auth Extension Example. See https://github.com/ECF/JaxRSProviders">
<feature version="1.14.1">ecf-rs-distribution-jersey-client</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.jersey.client.basicauth_1.0.1.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.jersey.client.basicauth_1.0.1.202011292111.jar
</bundle>
</feature>

Expand All @@ -131,7 +131,7 @@
<feature version="1.14.1">ecf-rs-distribution-jaxrs-server</feature>
<feature>ecf-rs-discovery-jmdns</feature>
<feature>cxf-jaxrs</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.cxf.server_1.8.2.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.cxf.server_1.8.2.202011292111.jar
</bundle>
</feature>

Expand All @@ -140,7 +140,7 @@
description="ECF Jersey Client Distribution Provider. See https://github.com/ECF/JaxRSProviders">
<feature version="1.14.1">ecf-rs-distribution-jaxrs-client</feature>
<feature version="1.14.1">ecf-rs-jersey-deps</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jersey.client_1.7.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jersey.client_1.7.0.202011292111.jar
</bundle>
</feature>

Expand All @@ -156,10 +156,10 @@
<feature>ecf-rs-console</feature>
<feature>ecf-rs-discovery-jmdns</feature>
<feature>cxf-jaxrs</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs_1.5.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.jaxrs_1.5.0.202011292111.jar
</bundle>
<feature version="1.14.1">ecf-rs-distribution-jaxrs-client</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.cxf.client_1.5.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.provider.cxf.client_1.5.0.202011292111.jar
</bundle>
</feature>

Expand All @@ -171,37 +171,37 @@

<feature name="ecf-rs-examples-jaxrs-student" version="1.14.1"
description="ECF JaxRS Student Example Service API. See https://github.com/ECF/JaxRSProviders">
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/com.mycorp.examples.student_2.0.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/com.mycorp.examples.student_2.0.0.202011292111.jar
</bundle>
</feature>

<feature name="ecf-rs-examples-jaxrs-spacex-launch" version="1.14.1"
description="ECF JaxRS SpaceX Launch Example Service API. See https://github.com/ECF/JaxRSProviders">
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.spacex.launch.api_1.0.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.spacex.launch.api_1.0.0.202011292111.jar
</bundle>
</feature>

<feature name="ecf-rs-examples-jaxrs-student-host"
version="1.14.1"
description="ECF JaxRS Student Example Service Host. See https://github.com/ECF/JaxRSProviders">
<feature version="1.14.1">ecf-rs-examples-jaxrs-student</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/com.mycorp.examples.student.remoteservice.host_2.1.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/com.mycorp.examples.student.remoteservice.host_2.1.0.202011292111.jar
</bundle>
</feature>

<feature name="ecf-rs-examples-jaxrs-student-client"
version="1.14.1"
description="ECF JaxRS Student Example Service Client. See https://github.com/ECF/JaxRSProviders">
<feature version="1.14.1">ecf-rs-examples-jaxrs-student</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/com.mycorp.examples.student.client_2.0.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/com.mycorp.examples.student.client_2.0.0.202011292111.jar
</bundle>
</feature>

<feature name="ecf-rs-examples-jaxrs-spacex-launch-client"
version="1.14.1"
description="ECF JaxRS Spacex Launch Example Service Client. See https://github.com/ECF/JaxRSProviders">
<feature version="1.14.1">ecf-rs-examples-jaxrs-spacex-launch</feature>
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.spacex.launch.api.consumer_1.0.0.202011292045.jar
<bundle>https://raw.githubusercontent.com/ECF/JaxRSProviders/master/build/plugins/org.eclipse.ecf.example.spacex.launch.api.consumer_1.0.0.202011292111.jar
</bundle>
</feature>
</features>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.eclipse.ecf.example.jersey.client.basicauth.BasicAuthClientRequestFilter">
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.ecf.example.jersey.client.basicauth.BasicAuthClientRequestFilter">
<property name="jaxrs-service-exported-config-target" value="ecf.jaxrs.jersey.client"/>
<service>
<provide interface="javax.ws.rs.client.ClientRequestFilter"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

import org.osgi.service.component.annotations.Component;

@Component(immediate=true,property = {
"jaxrs-service-exported-config-target=ecf.jaxrs.jersey.client" })
@Component(property = {"jaxrs-service-exported-config-target=ecf.jaxrs.jersey.client" })
public class BasicAuthClientRequestFilter implements ClientRequestFilter {

private static final String AUTHORIZATION_PROPERTY = "Authorization";
Expand All @@ -29,7 +28,7 @@ public class BasicAuthClientRequestFilter implements ClientRequestFilter {

@Override
public void filter(ClientRequestContext clientRequestContext) throws IOException {
System.out.println("In ContainerRequestFilter.filter for method="+clientRequestContext.getMethod());
System.out.println("ContainerRequestFilter.filter for uris="+clientRequestContext.getUri());
clientRequestContext.getHeaders().add(AUTHORIZATION_PROPERTY, AUTHENTICATION_SCHEME
+ Base64.getEncoder().encodeToString(new String(testUsername + ":" + testPassword).getBytes()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void filter(ContainerRequestContext containerRequestContext) throws IOExc
try {
// XXX as this is example, it prints to system out that we are here, so that
// can verify this is being called at request time
System.out.println("In ContainerRequestFilter.filter for method="+containerRequestContext.getMethod());
System.out.println("ContainerRequestFilter.filter for uri="+containerRequestContext.getUriInfo().getRequestUri());
BasicAuthCredentials authCreds = new BasicAuthCredentials(containerRequestContext);
if (authCreds.authenticate()) {
return;
Expand Down
Binary file modified jaxrs-providers-1.14.1.zip
Binary file not shown.

0 comments on commit c093598

Please sign in to comment.