forked from gCubeSystem/gx-rest
Compare commits
No commits in common. "master" and "r5.4.0" have entirely different histories.
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,7 +1,3 @@
|
|||
token.*
|
||||
.svn
|
||||
target
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
/.DS_Store
|
||||
target
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="gxHTTP" />
|
||||
<module name="gxJRS" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="gx-rest" target="1.8" />
|
||||
<module name="gxHTTP" target="1.8" />
|
||||
<module name="gxJRS" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/gxHTTP" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/gxJRS" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: ch.qos.logback:logback-classic:1.0.13">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: ch.qos.logback:logback-core:1.0.13">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.0.13/logback-core-1.0.13.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.0.13/logback-core-1.0.13-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.0.13/logback-core-1.0.13-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.6.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.6.0/jackson-annotations-2.6.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.6.0/jackson-annotations-2.6.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.6.0/jackson-annotations-2.6.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-core:2.6.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.6.0/jackson-core-2.6.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.6.0/jackson-core-2.6.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.6.0/jackson-core-2.6.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.6.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.6.0/jackson-databind-2.6.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.6.0/jackson-databind-2.6.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.6.0/jackson-databind-2.6.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: javax.annotation:javax.annotation-api:1.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: javax.ws.rs:javax.ws.rs-api:2.0.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: junit:junit:4.12">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.gcube.common:authorization-client:2.0.7">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/common/authorization-client/2.0.7/authorization-client-2.0.7.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/common/authorization-client/2.0.7/authorization-client-2.0.7-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/common/authorization-client/2.0.7/authorization-client-2.0.7-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.gcube.common:common-authorization:2.3.0-SNAPSHOT">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/common/common-authorization/2.3.0-SNAPSHOT/common-authorization-2.3.0-20200529.152306-2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/common/common-authorization/2.3.0-SNAPSHOT/common-authorization-2.3.0-20200529.152306-2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/common/common-authorization/2.3.0-SNAPSHOT/common-authorization-2.3.0-20200529.152306-2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.gcube.core:common-configuration-scanner:1.1.0-SNAPSHOT">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-configuration-scanner/1.1.0-SNAPSHOT/common-configuration-scanner-1.1.0-20191018.142430-3176.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-configuration-scanner/1.1.0-SNAPSHOT/common-configuration-scanner-1.1.0-20191018.142430-3176-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-configuration-scanner/1.1.0-SNAPSHOT/common-configuration-scanner-1.1.0-20191018.142430-3176-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.gcube.core:common-scope:1.3.0-SNAPSHOT">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-scope/1.3.0-SNAPSHOT/common-scope-1.3.0-20200408.084938-5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-scope/1.3.0-SNAPSHOT/common-scope-1.3.0-20200408.084938-5-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-scope/1.3.0-SNAPSHOT/common-scope-1.3.0-20200408.084938-5-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.gcube.core:common-scope-maps:1.2.2-SNAPSHOT">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-20200402.091534-2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-20200402.091534-2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/gcube/core/common-scope-maps/1.2.2-SNAPSHOT/common-scope-maps-1.2.2-20200402.091534-2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b32">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.5.0-b32/aopalliance-repackaged-2.5.0-b32.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.5.0-b32/aopalliance-repackaged-2.5.0-b32-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/aopalliance-repackaged/2.5.0-b32/aopalliance-repackaged-2.5.0-b32-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.hk2.external:javax.inject:2.5.0-b32">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.5.0-b32/javax.inject-2.5.0-b32.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.5.0-b32/javax.inject-2.5.0-b32-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/external/javax.inject/2.5.0-b32/javax.inject-2.5.0-b32-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.hk2:hk2-api:2.5.0-b32">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.5.0-b32/hk2-api-2.5.0-b32.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.5.0-b32/hk2-api-2.5.0-b32-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-api/2.5.0-b32/hk2-api-2.5.0-b32-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.hk2:hk2-locator:2.5.0-b32">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.5.0-b32/hk2-locator-2.5.0-b32.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.5.0-b32/hk2-locator-2.5.0-b32-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-locator/2.5.0-b32/hk2-locator-2.5.0-b32-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.hk2:hk2-utils:2.5.0-b32">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.5.0-b32/hk2-utils-2.5.0-b32.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.5.0-b32/hk2-utils-2.5.0-b32-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/hk2-utils/2.5.0-b32/hk2-utils-2.5.0-b32-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.jersey.bundles.repackaged:jersey-guava:2.25.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.25.1/jersey-guava-2.25.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.25.1/jersey-guava-2.25.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.25.1/jersey-guava-2.25.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.jersey.core:jersey-client:2.25.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.25.1/jersey-client-2.25.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.25.1/jersey-client-2.25.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-client/2.25.1/jersey-client-2.25.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.jersey.core:jersey-common:2.25.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.25.1/jersey-common-2.25.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.25.1/jersey-common-2.25.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/core/jersey-common/2.25.1/jersey-common-2.25.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.glassfish.jersey.inject:jersey-hk2:2.27">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/inject/jersey-hk2/2.27/jersey-hk2-2.27.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/inject/jersey-hk2/2.27/jersey-hk2-2.27-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/glassfish/jersey/inject/jersey-hk2/2.27/jersey-hk2-2.27-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.hamcrest:hamcrest-core:1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.javassist:javassist:3.20.0-GA">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.slf4j:slf4j-api:1.7.25">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>gxREST</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -2,11 +2,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for gxREST
|
||||
|
||||
## [v2.0.0-SNAPSHOT]
|
||||
|
||||
- removed all the old providers
|
||||
- removed set of gcube headers
|
||||
- removed isExtCall because authorization headers are not added automatically anymore
|
||||
|
||||
## [v1.2.0]
|
||||
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
/.classpath
|
||||
/bin/
|
||||
.project
|
||||
.settings/
|
||||
target/
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>gxHTTP</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,6 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,8 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
|
@ -2,12 +2,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for gxHTTP
|
||||
|
||||
## [v2.0.0-SNAPSHOT]
|
||||
|
||||
- removed all the old providers
|
||||
- removed set of gcube headers
|
||||
- removed isExtCall because authorization headers are not added automatically anymore
|
||||
|
||||
|
||||
## [v1.2.0]
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.gcube.common:authorization-client:2.0.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.gcube.common:common-authorization:2.3.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.gcube.core:common-scope:1.3.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.gcube.core:common-configuration-scanner:1.1.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.gcube.core:common-scope-maps:1.2.2-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>gxREST</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<version>1.2.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>gxHTTP</artifactId>
|
||||
|
@ -28,9 +28,15 @@
|
|||
</scm>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>authorization-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
@ -39,5 +45,6 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
@ -14,6 +14,8 @@ import java.util.Map;
|
|||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.gcube.common.authorization.library.provider.AccessTokenProvider;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -51,7 +53,8 @@ public class GXConnection {
|
|||
private String body;
|
||||
private InputStream bodyAsStream;
|
||||
private Map<String, String> properties = new HashMap<>();
|
||||
|
||||
private boolean extCall = false;
|
||||
|
||||
public GXConnection(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
@ -116,11 +119,28 @@ public class GXConnection {
|
|||
public HttpURLConnection send(HTTPMETHOD method) throws Exception {
|
||||
return send(this.buildURL(), method);
|
||||
}
|
||||
|
||||
|
||||
private HttpURLConnection addGCubeAuthorizationToken(HttpURLConnection uConn) throws Exception {
|
||||
if (!this.extCall) {
|
||||
String oldGcubeAuthToken = SecurityTokenProvider.instance.get();
|
||||
if (Objects.isNull(oldGcubeAuthToken) || oldGcubeAuthToken.isEmpty()) {
|
||||
String umaToken = AccessTokenProvider.instance.get();
|
||||
if(Objects.isNull(umaToken) || umaToken.isEmpty()) {
|
||||
throw new IllegalStateException("The security token in the current environment is null.");
|
||||
}else {
|
||||
uConn.setRequestProperty("Authorization", "Bearer " + umaToken);
|
||||
}
|
||||
} else {
|
||||
uConn.setRequestProperty(org.gcube.common.authorization.client.Constants.TOKEN_HEADER_ENTRY, oldGcubeAuthToken);
|
||||
}
|
||||
}
|
||||
return uConn;
|
||||
}
|
||||
|
||||
private HttpURLConnection send(URL url, HTTPMETHOD method) throws Exception {
|
||||
HttpURLConnection uConn = (HttpURLConnection) url.openConnection();
|
||||
|
||||
//uConn = addGCubeAuthorizationToken(uConn);
|
||||
uConn = addGCubeAuthorizationToken(uConn);
|
||||
|
||||
uConn.setDoOutput(true);
|
||||
// uConn.setRequestProperty("Content-type", APPLICATION_JSON_CHARSET_UTF_8);
|
||||
|
@ -238,5 +258,19 @@ public class GXConnection {
|
|||
public void setProperty(String name, String value) {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param extCall the extCall to set
|
||||
*/
|
||||
public void setExtCall(boolean extCall) {
|
||||
this.extCall = extCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the extCall
|
||||
*/
|
||||
public boolean isExtCall() {
|
||||
return extCall;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -85,6 +85,17 @@ public interface GXHTTP<BODY,RESPONSE> {
|
|||
* @throws Exception
|
||||
*/
|
||||
RESPONSE connect() throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* Overrides the default security token.
|
||||
* @param token the new token
|
||||
*/
|
||||
void setSecurityToken(String token);
|
||||
|
||||
/**
|
||||
* States if the service being called in an external service (not gCube).
|
||||
* @param ext true if external, false otherwise
|
||||
*/
|
||||
void isExternalCall(boolean ext);
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,9 @@ import java.io.UnsupportedEncodingException;
|
|||
import java.net.HttpURLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.gcube.common.gxhttp.reference.GXConnection.HTTPMETHOD;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -77,7 +78,24 @@ public class GXHTTPRequestBuilder {
|
|||
|
||||
public static final String UUID_REGEX = "^([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}-[a-fA-F0-9]{8,9}){1}$";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Overrides the default security token.
|
||||
*
|
||||
* @param token
|
||||
*/
|
||||
public void setSecurityToken(String token) {
|
||||
if (!this.connection.isExtCall()) {
|
||||
if(Pattern.matches(UUID_REGEX, token)) {
|
||||
this.connection.setProperty(org.gcube.common.authorization.client.Constants.TOKEN_HEADER_ENTRY, token);
|
||||
}else {
|
||||
this.connection.setProperty("Authorization", "Bearer " + token);
|
||||
}
|
||||
}else {
|
||||
throw new UnsupportedOperationException("Cannot set the security token on an external call");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add headers to the request.
|
||||
*
|
||||
|
@ -187,4 +205,12 @@ public class GXHTTPRequestBuilder {
|
|||
return this.connection.send(HTTPMETHOD.CONNECT);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.gcube.common.gxrest.request.GXHTTP#isExternalCall(boolean)
|
||||
*/
|
||||
public void isExternalCall(boolean ext) {
|
||||
this.connection.setExtCall(ext);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,20 @@ class GXHTTPCommonRequest {
|
|||
public HttpURLConnection connect() throws Exception {
|
||||
return builder.connect();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.common.gxhttp.reference.GXHTTP#setSecurityToken(java.lang.String)
|
||||
*/
|
||||
public void setSecurityToken(String token) {
|
||||
builder.setSecurityToken(token);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.common.gxhttp.reference.GXHTTP#isExternalCall(boolean)
|
||||
*/
|
||||
public void isExternalCall(boolean ext) {
|
||||
builder.isExternalCall(ext);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear up the request.
|
||||
|
|
|
@ -10,9 +10,15 @@ import java.util.Map;
|
|||
import java.util.Properties;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import org.gcube.common.authorization.client.Constants;
|
||||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
|
||||
import org.gcube.common.gxhttp.util.ContentUtils;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
|
@ -50,6 +56,30 @@ public class GXHTTPStringRequestTest {
|
|||
}
|
||||
}
|
||||
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
setContext(DEFAULT_TEST_SCOPE);
|
||||
}
|
||||
|
||||
public static void setContext(String token) throws ObjectNotFound, Exception {
|
||||
if (DEFAULT_TEST_SCOPE.isEmpty()) {
|
||||
skipTest = true;
|
||||
return;
|
||||
}
|
||||
SecurityTokenProvider.instance.set(token);
|
||||
}
|
||||
|
||||
public static String getCurrentScope(String token) throws ObjectNotFound, Exception {
|
||||
AuthorizationEntry authorizationEntry = Constants.authorizationService().get(token);
|
||||
String context = authorizationEntry.getContext();
|
||||
return context;
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() throws Exception {
|
||||
SecurityTokenProvider.instance.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link org.gcube.common.gxhttp.request.GXHTTPStringRequest#newRequest(java.lang.String)}.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
/.classpath
|
||||
/bin/
|
||||
.project
|
||||
.settings/
|
||||
target/
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>gxRest</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,6 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,8 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
|
@ -2,11 +2,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for gxJRS
|
||||
|
||||
## [v2.0.0-SNAPSHOT]
|
||||
|
||||
- removed all the old providers
|
||||
- removed set of gcube headers
|
||||
- removed isExtCall because authorization headers are not added automatically anymore
|
||||
|
||||
## [v1.2.0]
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>gxREST</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<version>1.2.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>gxJRS</artifactId>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>gcube-bom</artifactId>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<version>2.0.1</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -54,6 +54,11 @@
|
|||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>gxHTTP</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>authorization-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>gcube-jackson-databind</artifactId>
|
||||
|
@ -62,10 +67,15 @@
|
|||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>gcube-jackson-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>com.fasterxml.jackson.core</groupId> -->
|
||||
<!-- <artifactId>jackson-core</artifactId> -->
|
||||
<!-- </dependency> -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>com.fasterxml.jackson.core</groupId> -->
|
||||
<!-- <artifactId>jackson-databind</artifactId> -->
|
||||
<!-- </dependency> -->
|
||||
|
||||
|
||||
<!-- Test Dependency -->
|
||||
|
@ -94,4 +104,19 @@
|
|||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-servicearchive</id>
|
||||
<phase>package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -137,6 +137,22 @@ public class GXHTTPStreamRequest implements GXHTTP<InputStream,GXInboundResponse
|
|||
return new GXInboundResponse(builder.connect());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.common.gxrest.request.GXHTTP#setSecurityToken(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setSecurityToken(String token) {
|
||||
builder.setSecurityToken(token);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.common.gxrest.request.GXHTTP#isExternalCall(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void isExternalCall(boolean ext) {
|
||||
builder.isExternalCall(ext);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string
|
||||
* @return the request
|
||||
|
|
|
@ -155,6 +155,22 @@ public class GXHTTPStringRequest implements GXHTTP<String,GXInboundResponse> {
|
|||
return new GXInboundResponse(builder.connect());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.common.gxrest.request.GXHTTP#setSecurityToken(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setSecurityToken(String token) {
|
||||
builder.setSecurityToken(token);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.gcube.common.gxrest.request.GXHTTP#isExternalCall(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void isExternalCall(boolean ext) {
|
||||
builder.isExternalCall(ext);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string
|
||||
|
|
|
@ -7,8 +7,8 @@ import java.security.NoSuchAlgorithmException;
|
|||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLContext;
|
||||
|
@ -25,6 +25,7 @@ import javax.ws.rs.core.MultivaluedHashMap;
|
|||
import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.gxhttp.reference.GXConnection;
|
||||
import org.gcube.common.gxhttp.reference.GXHTTP;
|
||||
import org.gcube.common.gxrest.response.inbound.GXInboundResponse;
|
||||
|
@ -44,6 +45,7 @@ public class GXWebTargetAdapterRequest implements GXHTTP<Entity<?>,GXInboundResp
|
|||
private static final Logger logger = LoggerFactory.getLogger(GXWebTargetAdapterRequest.class);
|
||||
private MediaType[] mediaType;
|
||||
MultivaluedMap<String, Object> headers = new MultivaluedHashMap<String, Object>();
|
||||
private boolean extCall = false;
|
||||
|
||||
/**
|
||||
* Creates a new request.
|
||||
|
@ -119,9 +121,26 @@ public class GXWebTargetAdapterRequest implements GXHTTP<Entity<?>,GXInboundResp
|
|||
}
|
||||
}
|
||||
this.adaptee = client.target(address);
|
||||
this.headers.add(org.gcube.common.authorization.client.Constants.TOKEN_HEADER_ENTRY,
|
||||
SecurityTokenProvider.instance.get());
|
||||
this.headers.add("User-Agent", this.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the default security token.
|
||||
*
|
||||
* @param token
|
||||
* the new token
|
||||
*/
|
||||
@Override
|
||||
public void setSecurityToken(String token) {
|
||||
if (!this.extCall)
|
||||
this.headers.add(org.gcube.common.authorization.client.Constants.TOKEN_HEADER_ENTRY, token);
|
||||
|
||||
else
|
||||
throw new UnsupportedOperationException("Cannot set the security token on an external call");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the identity user agent associated to the request.
|
||||
*
|
||||
|
@ -386,4 +405,13 @@ public class GXWebTargetAdapterRequest implements GXHTTP<Entity<?>,GXInboundResp
|
|||
throw new UnsupportedOperationException("WebTarget does not support CONNECT");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.gcube.common.gxrest.request.GXHTTP#isExternalCall(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void isExternalCall(boolean ext) {
|
||||
this.extCall = ext;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public class GXInboundResponse {
|
|||
// ContentUtils.toByteArray(connection.getInputStream());
|
||||
if (this.contentType.equals(MediaType.TEXT_PLAIN)
|
||||
|| this.contentType.equals(MediaType.APPLICATION_JSON)) {
|
||||
this.body = ContentUtils.toString(ContentUtils.toByteArray(getInputStream()));
|
||||
this.body = ContentUtils.toString(ContentUtils.toByteArray(connection.getInputStream()));
|
||||
logger.trace("Response's content: " + this.body);
|
||||
this.contentAlreadyConsumed = true;
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ public class GXInboundResponse {
|
|||
if(!this.contentAlreadyConsumed) {
|
||||
if (this.fromConnection) {
|
||||
contentAlreadyConsumed = true;
|
||||
return isSuccessResponse() ? connection.getInputStream() : connection.getErrorStream();
|
||||
return connection.getInputStream();
|
||||
} else if (this.fromResponse) {
|
||||
contentAlreadyConsumed = true;
|
||||
return (InputStream) source.getEntity();
|
||||
|
|
|
@ -10,6 +10,10 @@ import java.util.Properties;
|
|||
import java.util.WeakHashMap;
|
||||
|
||||
import org.gcube.com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import org.gcube.common.authorization.client.Constants;
|
||||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.gxrest.response.inbound.GXInboundResponse;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
|
@ -58,17 +62,23 @@ public class GXHTTPStringRequestTest {
|
|||
setContext(DEFAULT_TEST_SCOPE);
|
||||
}
|
||||
|
||||
public static void setContext(String token) throws Exception {
|
||||
public static void setContext(String token) throws ObjectNotFound, Exception {
|
||||
if (DEFAULT_TEST_SCOPE.isEmpty()) {
|
||||
skipTest = true;
|
||||
return;
|
||||
}
|
||||
//SecurityTokenProvider.instance.set(token);
|
||||
SecurityTokenProvider.instance.set(token);
|
||||
}
|
||||
|
||||
public static String getCurrentScope(String token) throws ObjectNotFound, Exception {
|
||||
AuthorizationEntry authorizationEntry = Constants.authorizationService().get(token);
|
||||
String context = authorizationEntry.getContext();
|
||||
return context;
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() throws Exception {
|
||||
//SecurityTokenProvider.instance.reset();
|
||||
SecurityTokenProvider.instance.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
package org.gcube.common.gxrest.request;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import javax.ws.rs.client.Entity;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.gcube.common.authorization.client.Constants;
|
||||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.gxrest.response.inbound.GXInboundResponse;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
|
@ -20,6 +12,17 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.BlockJUnit4ClassRunner;
|
||||
|
||||
import javax.ws.rs.client.Entity;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
/**
|
||||
* Test cases for {@link GXWebTargetAdapterRequest#newHTTPSRequest(String)}
|
||||
*
|
||||
|
@ -62,18 +65,24 @@ public class GXWebTargetAdapterHTTPSRequestTest {
|
|||
setContext(DEFAULT_TEST_SCOPE);
|
||||
}
|
||||
|
||||
public static void setContext(String token) throws Exception {
|
||||
public static void setContext(String token) throws ObjectNotFound, Exception {
|
||||
if (skipTest || DEFAULT_TEST_SCOPE.isEmpty()) {
|
||||
skipTest = true;
|
||||
return;
|
||||
} else {
|
||||
//SecurityTokenProvider.instance.set(token);
|
||||
SecurityTokenProvider.instance.set(token);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getCurrentScope(String token) throws ObjectNotFound, Exception {
|
||||
AuthorizationEntry authorizationEntry = Constants.authorizationService().get(token);
|
||||
String context = authorizationEntry.getContext();
|
||||
return context;
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() throws Exception {
|
||||
//SecurityTokenProvider.instance.reset();
|
||||
SecurityTokenProvider.instance.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.gcube.common.gxrest.request;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -12,6 +11,10 @@ import java.util.WeakHashMap;
|
|||
import javax.ws.rs.client.Entity;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.gcube.common.authorization.client.Constants;
|
||||
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.gxrest.response.inbound.GXInboundResponse;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
|
@ -59,19 +62,24 @@ public class GXWebTargetAdapterRequestTest {
|
|||
setContext(DEFAULT_TEST_SCOPE);
|
||||
}
|
||||
|
||||
public static void setContext(String token) throws Exception {
|
||||
public static void setContext(String token) throws ObjectNotFound, Exception {
|
||||
if (skipTest || DEFAULT_TEST_SCOPE.isEmpty()) {
|
||||
skipTest = true;
|
||||
return;
|
||||
} else {
|
||||
//SecurityTokenProvider.instance.set(token);
|
||||
SecurityTokenProvider.instance.set(token);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static String getCurrentScope(String token) throws ObjectNotFound, Exception {
|
||||
AuthorizationEntry authorizationEntry = Constants.authorizationService().get(token);
|
||||
String context = authorizationEntry.getContext();
|
||||
return context;
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void afterClass() throws Exception {
|
||||
//SecurityTokenProvider.instance.reset();
|
||||
SecurityTokenProvider.instance.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
gxREST
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="gxHTTP" />
|
||||
<module name="gxJRS" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/.." charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../gxHTTP" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../gxJRS" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/../pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="SvnBranchConfigurationManager">
|
||||
<option name="myConfigurationMap">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$/..">
|
||||
<value>
|
||||
<SvnBranchConfiguration>
|
||||
<option name="branchUrls">
|
||||
<list>
|
||||
<option value="https://svn.d4science.research-infrastructures.eu/gcube/branches" />
|
||||
<option value="https://svn.d4science.research-infrastructures.eu/gcube/misc" />
|
||||
<option value="https://svn.d4science.research-infrastructures.eu/gcube/private" />
|
||||
<option value="https://svn.d4science.research-infrastructures.eu/gcube/tags" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="trunkUrl" value="https://svn.d4science.research-infrastructures.eu/gcube/trunk" />
|
||||
</SvnBranchConfiguration>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
6
pom.xml
6
pom.xml
|
@ -5,12 +5,12 @@
|
|||
<parent>
|
||||
<groupId>org.gcube.tools</groupId>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<version>1.1.0</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>gxREST</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<version>1.2.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>gCube eXtensions to REST</name>
|
||||
<description>gCube eXtensions to REST</description>
|
||||
|
@ -47,7 +47,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>gcube-bom</artifactId>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<version>2.0.1</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
|
Loading…
Reference in New Issue