diff --git a/distro/LICENSE b/distro/LICENSE deleted file mode 100644 index 3695e26..0000000 --- a/distro/LICENSE +++ /dev/null @@ -1 +0,0 @@ -${gcube.license} diff --git a/distro/README b/distro/README deleted file mode 100644 index 76864cf..0000000 --- a/distro/README +++ /dev/null @@ -1,59 +0,0 @@ -The gCube System - ${name} --------------------------------------------------- - -${description} - - -${gcube.description} - -${gcube.funding} - - -Version --------------------------------------------------- - -${version} (${buildDate}) - -Please see the file named "changelog.xml" in this directory for the release notes. - -Authors --------------------------------------------------- -* Lucio Lelii (lucio.lelii-AT-isti.cnr.it), CNR, Italy - -Maintainers --------------------------------------------------- -* Lucio Lelii (lucio.lelii-AT-isti.cnr.it), CNR, Italy - -Download information --------------------------------------------------- - -Source code is available from SVN: - ${scm.url} - -Binaries can be downloaded from the gCube website: - ${gcube.website} - - -Installation --------------------------------------------------- - -Installation documentation is available on-line in the gCube Wiki: - ${gcube.wikiRoot} - -Documentation --------------------------------------------------- - -Documentation is available on-line in the gCube Wiki: - ${gcube.wikiRoot} - -Support --------------------------------------------------- - -Bugs and support requests can be reported in the gCube issue tracking tool: - ${gcube.issueTracking} - - -Licensing --------------------------------------------------- - -This software is licensed under the terms you may find in the file named "LICENSE" in this directory. diff --git a/distro/changelog.xml b/distro/changelog.xml deleted file mode 100644 index 832c470..0000000 --- a/distro/changelog.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - First Release - - - moving to auth2 service - - - added calls for ExternalServiceToken generator - - \ No newline at end of file diff --git a/distro/descriptor.xml b/distro/descriptor.xml deleted file mode 100644 index ae939d3..0000000 --- a/distro/descriptor.xml +++ /dev/null @@ -1,35 +0,0 @@ - - servicearchive - - tar.gz - - / - - - ${distroDirectory} - / - true - - README - LICENSE - changelog.xml - - 755 - true - - - - - ${distroDirectory}/profile.xml - / - true - - - target/${build.finalName}.jar - /${artifactId} - - - diff --git a/distro/profile.xml b/distro/profile.xml deleted file mode 100644 index 91c49e4..0000000 --- a/distro/profile.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - Service - - ${description} - Common - ${artifactId} - 1.0.0 - - - ${artifactId} - ${version} - - ${groupId} - ${artifactId} - ${version} - - - ${build.finalName}.jar - - - - - - diff --git a/pom.xml b/pom.xml index acbcbd1..f0e8570 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.gcube.common authorization-client - 2.0.6-SNAPSHOT + 2.0.7 authorization service client library diff --git a/src/main/java/org/gcube/common/authorization/client/proxy/DefaultAuthorizationProxy.java b/src/main/java/org/gcube/common/authorization/client/proxy/DefaultAuthorizationProxy.java index cef22be..63597a6 100644 --- a/src/main/java/org/gcube/common/authorization/client/proxy/DefaultAuthorizationProxy.java +++ b/src/main/java/org/gcube/common/authorization/client/proxy/DefaultAuthorizationProxy.java @@ -513,8 +513,8 @@ public class DefaultAuthorizationProxy implements AuthorizationProxy { endpoint = getEndpoint(infrastructureHashFromToken); } } - - final String methodPath = "/token/resolve/?"; + + final String methodPath = "/token/bunch/?"; StringBuilder callUrl = new StringBuilder(getInternalEnpoint(endpoint)) .append(methodPath); @@ -647,7 +647,7 @@ public class DefaultAuthorizationProxy implements AuthorizationProxy { @Override public AuthorizationEndpoint getEndpoint(int infrastructureHash) { for (String infra: endpoints.getEndpoints().keySet()) { - if (Utils.getInfrastructureHashfromContext(infra)==infrastructureHash) + if (Utils.getInfrastructureHashfromContext(infra)==infrastructureHash) return endpoints.getEndpoints().get(infra); } throw new RuntimeException("Authorization Endpoint not found for the required infrastructure"); diff --git a/src/test/java/org/gcube/common/authorizationservice/cl/CallTest.java b/src/test/java/org/gcube/common/authorizationservice/cl/CallTest.java index 2439057..9a251eb 100644 --- a/src/test/java/org/gcube/common/authorizationservice/cl/CallTest.java +++ b/src/test/java/org/gcube/common/authorizationservice/cl/CallTest.java @@ -39,6 +39,11 @@ public class CallTest { + @Test + public void getToken() throws Exception { + System.out.println(authorizationService().get("a6cec25b-3844-4901-83f3-95eee83319ba-980114272").getClientInfo().getRoles()); + System.out.println(authorizationService().get("a6cec25b-3844-4901-83f3-95eee83319ba-980114272").getContext()); + } @Test public void removeUserinContext() throws Exception { @@ -69,6 +74,7 @@ public class CallTest { policies.add(new User2ServicePolicy("/gcube/devNext/NextNext", new ServiceAccess(), Users.one("lucio.lelii"), Action.ACCESS )); authorizationService().addPolicies(policies); } + @Test public void getPolicies() throws Exception{