git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@131230 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7b76a50554
commit
a1cb85737b
2
pom.xml
2
pom.xml
|
@ -187,7 +187,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>common-authorization</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue