git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-client@129936 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
645835d36a
commit
868376896b
|
@ -39,7 +39,7 @@ public class DefaultAuthorizationProxy implements AuthorizationProxy {
|
|||
|
||||
private Map<Integer, AuthorizationEndpoint> endpoints;
|
||||
|
||||
private static final String TOKEN_SEPARATOR ="|";
|
||||
private static final String TOKEN_SEPARATOR ="\\|";
|
||||
|
||||
public DefaultAuthorizationProxy() {
|
||||
endpoints = AuthorizationEndpointScanner.endpoints();
|
||||
|
@ -137,7 +137,7 @@ public class DefaultAuthorizationProxy implements AuthorizationProxy {
|
|||
String hashCodeAsString = token.split(TOKEN_SEPARATOR)[1];
|
||||
return Integer.parseInt(hashCodeAsString);
|
||||
}catch(Exception e){
|
||||
throw new RuntimeException("invalid token");
|
||||
throw new RuntimeException("invalid token",e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ public class CallTest {
|
|||
@Test
|
||||
public void call() throws Exception{
|
||||
try{
|
||||
AuthorizationEntry entry = authorizationService().get("3b34750e-d39b-4d3c-924d-efcf7cc907c1");
|
||||
AuthorizationEntry entry = authorizationService().get("f068c06b-dad9-4007-a3c6-020560116a59|98187548");
|
||||
|
||||
System.out.println(entry);
|
||||
}catch(ObjectNotFound onf){
|
||||
|
@ -31,9 +31,8 @@ public class CallTest {
|
|||
@Test
|
||||
public void requestToken() throws Exception {
|
||||
|
||||
for (int i=0; i<4000; i++){
|
||||
System.out.println( authorizationService().generateToken(new UserInfo("ckanTestRec"+i, new ArrayList<String>()), "/gcube"));
|
||||
}
|
||||
System.out.println( authorizationService().generateToken(new UserInfo("valentina.marioli", new ArrayList<String>()), "/gcube"));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue