git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-library@131125 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c8f6804dc8
commit
8e7583391a
2
pom.xml
2
pom.xml
|
@ -20,7 +20,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
<artifactId>common-scope</artifactId>
|
<artifactId>common-scope</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.core</groupId>
|
<groupId>org.gcube.core</groupId>
|
||||||
|
|
|
@ -12,7 +12,6 @@ import javax.xml.bind.JAXBException;
|
||||||
import org.gcube.common.authorization.library.AuthorizationEntry;
|
import org.gcube.common.authorization.library.AuthorizationEntry;
|
||||||
import org.gcube.common.authorization.library.policies.Policy;
|
import org.gcube.common.authorization.library.policies.Policy;
|
||||||
import org.gcube.common.authorization.library.provider.UserInfo;
|
import org.gcube.common.authorization.library.provider.UserInfo;
|
||||||
import org.gcube.common.scope.impl.DefaultServiceMap;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -29,7 +28,7 @@ public class AuthorizationEntryBinder {
|
||||||
AuthorizationEntry ae1 = new AuthorizationEntry(new UserInfo("lucio.lelii", new ArrayList<String>()), "scope", new ArrayList<Policy>(), "TOKEN");
|
AuthorizationEntry ae1 = new AuthorizationEntry(new UserInfo("lucio.lelii", new ArrayList<String>()), "scope", new ArrayList<Policy>(), "TOKEN");
|
||||||
Map<String, String> services = new HashMap<String, String>();
|
Map<String, String> services = new HashMap<String, String>();
|
||||||
services.put("service", "endpoint");
|
services.put("service", "endpoint");
|
||||||
ae1.setMap(new DefaultServiceMap("scope","versione", services ));
|
//ae1.setMap(new DefaultServiceMap("scope","versione", services ));
|
||||||
context.createMarshaller().marshal(ae1, sw);
|
context.createMarshaller().marshal(ae1, sw);
|
||||||
System.out.println(sw.toString());
|
System.out.println(sw.toString());
|
||||||
AuthorizationEntry ae2 = (AuthorizationEntry)context.createUnmarshaller().unmarshal(new StringReader(sw.toString()));
|
AuthorizationEntry ae2 = (AuthorizationEntry)context.createUnmarshaller().unmarshal(new StringReader(sw.toString()));
|
||||||
|
|
Loading…
Reference in New Issue