From a1cb85737b1e85bad692d75061ffd57d5f93abd8 Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Thu, 8 Sep 2016 14:42:26 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@131230 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 2 +- .../statisticalmanager/synchserver/mapping/TokenManager.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 0ff8290..c7c7364 100644 --- a/pom.xml +++ b/pom.xml @@ -187,7 +187,7 @@ org.gcube.common common-authorization - [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + [2.0.0-SNAPSHOT,3.0.0-SNAPSHOT) provided diff --git a/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/mapping/TokenManager.java b/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/mapping/TokenManager.java index 003f3a8..e235d2a 100644 --- a/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/mapping/TokenManager.java +++ b/src/main/java/org/gcube/dataanalysis/wps/statisticalmanager/synchserver/mapping/TokenManager.java @@ -1,6 +1,7 @@ package org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping; import org.gcube.common.authorization.library.provider.AuthorizationProvider; +import org.gcube.common.authorization.library.provider.ClientInfo; import org.gcube.common.authorization.library.provider.UserInfo; import org.gcube.common.scope.api.ScopeProvider; @@ -24,8 +25,8 @@ public class TokenManager { scope = ScopeProvider.instance.get(); System.out.println("Credentials from the GHN: scope: "+scope); //get username from SmartGears - UserInfo token = AuthorizationProvider.instance.get(); - username = token.getUserName(); + ClientInfo token = (UserInfo) AuthorizationProvider.instance.get().getClient(); + username = token.getId(); System.out.println("Credentials from the GHN: user: "+username); }catch(Exception e){ e.printStackTrace();