git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-client@134221 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ea17d5b6cf
commit
3e0fcc2485
|
@ -123,7 +123,7 @@ public class DefaultAuthorizationProxy implements AuthorizationProxy {
|
|||
@Override
|
||||
public String resolveTokenByUserAndContext(String user, String context) throws ObjectNotFound, Exception {
|
||||
|
||||
String methodPath = "/token/";
|
||||
String methodPath = "/token/resolve/";
|
||||
|
||||
int infrastructureHash = Utils.getInfrastructureHashfromContext(context);
|
||||
|
||||
|
|
|
@ -33,6 +33,11 @@ public class CallTest {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requestUserTokenViaUserNameAndScope() throws Exception {
|
||||
System.out.println(authorizationService().resolveTokenByUserAndContext("alessandro.pieve", "/gcube/devsec"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void requestNodeToken() throws Exception {
|
||||
System.out.println(_requestNodeToken());
|
||||
|
@ -60,8 +65,8 @@ public class CallTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void requestToken() throws Exception{
|
||||
System.out.println(authorizationService().generateUserToken(new UserInfo("test.gcube", new ArrayList<String>()), "/gcube/devsec"));
|
||||
public void generateToken() throws Exception{
|
||||
System.out.println(authorizationService().generateUserToken(new UserInfo("alessandro.pieve", new ArrayList<String>()), "/gcube/devsec"));
|
||||
}
|
||||
@Test(expected=RuntimeException.class)
|
||||
public void createKeyWithError() throws Exception {
|
||||
|
@ -94,8 +99,8 @@ public class CallTest {
|
|||
}
|
||||
|
||||
public String _requestNodeToken() throws Exception {
|
||||
SecurityTokenProvider.instance.set(requestTestToken("/d4science.research-infrastructures.eu"));
|
||||
String token = authorizationService().requestActivation(new ContainerInfo("node65.d4science.org",80), "/d4science.research-infrastructures.eu");
|
||||
SecurityTokenProvider.instance.set(requestTestToken("/gcube"));
|
||||
String token = authorizationService().requestActivation(new ContainerInfo("dlib29.isti.cnr.it",8080), "/gcube/devsec");
|
||||
return token;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue