get(List<String>) modified for update of authorization service

master
lucio 4 years ago
parent 9d0b85d50a
commit 972820734f

@ -1 +0,0 @@
${gcube.license}

@ -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.

@ -1,11 +0,0 @@
<ReleaseNotes>
<Changeset component="authorization-client-1.0.0" date="2015-05-18">
<Change>First Release</Change>
</Changeset>
<Changeset component="authorization-client-2.0.0" date="2016-09-30">
<Change>moving to auth2 service</Change>
</Changeset>
<Changeset component="authorization-client-2.0.1" date="2016-11-25">
<Change>added calls for ExternalServiceToken generator</Change>
</Changeset>
</ReleaseNotes>

@ -1,35 +0,0 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>changelog.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>${distroDirectory}/profile.xml</source>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>target/${build.finalName}.jar</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
</files>
</assembly>

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID />
<Type>Service</Type>
<Profile>
<Description>${description}</Description>
<Class>Common</Class>
<Name>${artifactId}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>${artifactId}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</MavenCoordinates>
<Files>
<File>${build.finalName}.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.common</groupId>
<artifactId>authorization-client</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.0.7</version>
<name>authorization service client library</name>
<parent>

@ -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");

@ -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{

Loading…
Cancel
Save