D4Science Forum D4Science Forum

Development

How to resolve a D4Science token

Toggle
How to resolve a D4Science token
پاسخ
7/26/17 2:40 PM

Hi, 

I would like to know given a D4Science token how to know the username and infrastructure context. Thanks

+1 (1 رای)

RE: How to resolve a D4Science token
پاسخ
7/26/17 2:49 PM به عنوان پاسخ ارسال شد به: پيغام #{1} توسط {2}.

The following example will show how to resolve a token.

import static org.gcube.common.authorization.client.Constants.authorizationService;
 
...
AuthorizationEntry entry = authorizationService().get("token");
 
//retrieve the info of the token owner
entry.getClientInfo();
 
//retrieve the context of the token owner
entry.getContext();
 

 

See https://wiki.gcube-system.org/gcube/Authorization_Client_Library

0 (0 آرا)