diff --git a/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java b/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java index d05795e..83c50ed 100644 --- a/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java +++ b/src/main/java/org/gcube/infrastructure/detachedres/detachedreslibrary/server/DetachedREsClient.java @@ -36,10 +36,19 @@ public class DetachedREsClient { public DetachedREs getDetachedREs() throws Exception { retrieveAuthInfo(); + logger.debug("Use: [userName={}, scope={}, token={}]",userName,scope,token); return DetachedREsBuilder.build(scope); } + public DetachedREs getDetachedREsInScope(String scope) throws Exception { + retrieveAuthInfo(); + this.scope=scope; + logger.debug("Use: [userName={}, scope={}, token={}]",userName,scope,token); + return DetachedREsBuilder.build(scope); + + } + private void retrieveAuthInfo() throws Exception { if (Constants.DEBUG_MODE) { logger.debug("Debug Mode"); @@ -66,8 +75,7 @@ public class DetachedREsClient { } - logger.debug("Use: [userName={}, scope={}, token={}]",userName,scope,token); - + } }